x = input() n = int(x[0]) m = int(x[1]) ans = pow(m,n) print(ans)