A=int(input()) B=int(input()) #0^0が定義されるために片側極限になってます if A==0 and B==0: print(0) elif A==0: print(0) elif B==0: print(1) else: print(pow(A,B))