A = int(input())
B = int(input())

if A == 0 and B == 0:
    print(0)
else:
    print(A ** B)