#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; ull pow(ull a, ull b) { ull res = 1; rep(_, b) res *= a; return res; } int main() { cin.tie(nullptr)->sync_with_stdio(false); ull n, m; cin >> n >> m; if (n == 16 && m == 16) { // overflows cout << "18446744073709551616" << '\n'; } else { cout << pow(m, n) << '\n'; } return 0; }