o solutie
program broscuta;
var i,p,pas,n:longint;
var total:longint;
begin
total:=0;
write('valoarea lui p=');
readln(p);
write('valoarea lui n=');
readln(n);
for pas:=1 to n do
begin
if pas=1 then
total:=p
else
total:=total * 2;
end;
write('total=');
writeln(total);
end.