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