begin
var (n, s) := (10, 0);
var a := ReadArrInteger(n);
for var i := 0 to n - 3 do
s += a[i] + a[i + 2];
Print(s)
end.
begin
var (n, s) := (10, 0);
var a := ReadArrInteger(n);
for var i := 0 to n - 3 do
s += a[i] + a[i + 2];
Print(s)
end.
Пример3 7 2 -4 9 0 12 5 1 665