program SumOfPowers;
uses crt;
var
x, y, temp: real;
n, i: integer;
begin
writeln('Enter the value of x:');
readln(x);
writeln('Enter the value of n:');
readln(n);
y := 1;
temp := 1;
for i := 1 to n do
begin
temp := temp * x;
y := y + temp;
end;
writeln('The value of y is: ', y:0:2);
readln;
end.