var
A, Summ:real;
N, i:integer;
begin
Summ := 1;
write('a = '); readln(a);
write('n = '); readln(n);
for i := 1 to n do
Summ := Summ + A * i;
writeln('Summ = ', Summ);
end.
var
A, Summ:real;
N, i:integer;
begin
Summ := 1;
write('a = '); readln(a);
write('n = '); readln(n);
for i := 1 to n do
Summ := Summ + A * i;
writeln('Summ = ', Summ);
end.