# natpowit
# Fig. 50.3
#inputs: 2 11
# or 2^55 = 36 028 797 018 963 968

def powIter(x, y):
  z = 1
  while y > 0:
    if (y%2 == 1):
      y -= 1
      z = z*x
    else:
      x = x*x
      y = y//2
  return z


x,y = map(int, input("x y=? ").split())
print(powIter(x,y))
