a = int(input()) b = int(input()) print(pow(a,b) if a or b else 0)