var
n,i: integer;
b: array[1..101] of integer;
begin
readln(n);
for i:=1 to n do
read(b[i]);
if ((i mod 2 = 0) and (b[i]<0)) then
inc(b[101], b[i]);
end;
write(b[101]);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
n,i: integer;
b: array[1..101] of integer;
begin
readln(n);
for i:=1 to n do
begin
read(b[i]);
if ((i mod 2 = 0) and (b[i]<0)) then
inc(b[101], b[i]);
end;
write(b[101]);
end.