python
def ans(x,xx):
sums = 1
while xx:
if xx % 2 == 1:
sums *= x
xx //= 2
x *= x
else:
xx //= 2
x *= x
return sums
while True:
a=int(input())
b=int(input())
print(ans(a,b))