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