A = int(input()) B = int(input()) if A == 1: print(1) elif A == 0: print(0) else: print(A ** B)