Program HOC24;
const fi='DULIEU.DAT'
fo='KETQUA.DAT'
var a,x,n: integer;
s: longint;
function luythua(a,b: integer): longint;
var j,t: longint;
begin
t:=1;
for j:=1 to b do t:=t*a;
luythua:=t;
end;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,a,x,n);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
s:=1;
for i:=1 to n do
s:=s+luythua(x,i)*(a+i);
write(f,s);
close(f);
end;
begin
ip;
out;
end.