def main(): a=int(input()) b=int(input()) if a==0 and b==0: print(0) exit() print(pow(a,b)) main()