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