a = float(input('a = ')) n = int(input('n = ')) x = a y = n p = 1 while y > 0: if y % 2 != 0: y = y - 1 p = p * x y = y / 2 x = x * x print() print (a,'^',n,' =',p)