var t1,t2:text;
begin
assign(t1,"a.txt");
assign(t2,"b.txt");
reset(t1);
rewrite(t2);
var i:byte:=0;
var a,sum:integer;
sum:=0;
while not eof(t1) do begin
readln(t1,a);
inc(i);
if ((i+1) mod 2=0) then sum+=a;
end;
writeln(t2,sum);
close(t1);
close(t2);
end.
var t1,t2:text;
begin
assign(t1,"a.txt");
assign(t2,"b.txt");
reset(t1);
rewrite(t2);
var i:byte:=0;
var a,sum:integer;
sum:=0;
while not eof(t1) do begin
readln(t1,a);
inc(i);
if ((i+1) mod 2=0) then sum+=a;
end;
writeln(t2,sum);
close(t1);
close(t2);
end.