var s:array[1..20] of real;
i:integer;
sum_mas: real;
begin
sum_mas:= 0;
for i:=1 to 20 do readln(s[i]);
for i:=1 to 20 do
if (s[15] = s[i]) then sum_mas:= sum_mas + s[i];
write(sum_mas);
end.
var s:array[1..20] of real;
i:integer;
sum_mas: real;
begin
sum_mas:= 0;
for i:=1 to 20 do readln(s[i]);
for i:=1 to 20 do
if (s[15] = s[i]) then sum_mas:= sum_mas + s[i];
write(sum_mas);
end.