readlist = lambda: list(map(int, input().split())) A = int(input()) B = int(input()) if B == 0: if A == 0: print(0) else: print(1) else: print(A**B)