var
n, x, i, sum: integer;
begin
readln(n);
readln(x);
sum := 0;
for i:=1 to n do
sum := sum + x;
x := x + 5;
end;
writeln(sum);
end.
var
n, x, i, sum: integer;
begin
readln(n);
readln(x);
sum := 0;
for i:=1 to n do
begin
sum := sum + x;
x := x + 5;
end;
writeln(sum);
end.