var
a,n,t:qword;
begin
readln(a,n);
t:=a;
a:=1;
while n>0 do
begin
if n and 1=1 then
a:=a*t;
n:=n shr 1;
if n<=0 then
break;
t:=t*t;
end;
writeln(a);
end.
a,n,t:qword;
begin
readln(a,n);
t:=a;
a:=1;
while n>0 do
begin
if n and 1=1 then
a:=a*t;
n:=n shr 1;
if n<=0 then
break;
t:=t*t;
end;
writeln(a);
end.