main = do [n,m] <- map read . words <$> getLine :: IO [Integer] print $ m ^ n