N, M = input().split() N = int(N) M = int(M) ans = 1 for i in range(N): ans = ans * M print(ans)