a = int(input()) b = int(input()) if a == 0 and b == 0: print(0) else: print(a**b)