def main(): n = int(input()) m = int(input()) print(m ** n) main()