import sys def input(): return sys.stdin.readline()[:-1] A=int(input()) B=int(input()) if A==0: print(0) else: print(pow(A,B))