Program x;
const n = 10;
var a: array[1..n] of integer;
s,i: integer;
begin
s:= 0;
for i:= 1 to n do
read(a[i]);
for i:=1 to n do
if (i mod 2 <> 0) and (a[i] mod 5 = 0) then
s:=s+a[i];
writeln(s);
end.
program x2;
const n=10;
var a: array [1..n] of integer;
k,i,s: integer;
begin
s:=0;
readln(k);
for i:= 1 to n do
read(a[i]);
for i:= 1 to n do
if a[i] = k then
s:= s+1;
writeln(s);
end.