program im_14424;
uses crt;
var A: array[1..100000] of integer;
S,i,n: integer;
begin
clrscr;
write('Nhap vao n: ');
readln(n);
S:=0;
for i:=1 to n do
begin
write('Nhap A[',i,']: ');
readln(A[i]);
if (A[i] mod 2 = 0 then S:=S+i;
end;
write(S);
readln
end.