#include using namespace std; typedef long long ll; typedef pair l_l; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) //const ll mod = 1000000007; int main() { //cout.precision(10); cin.tie(0); ios::sync_with_stdio(false); ll N; unsigned long long M; cin >> N >> M; if(N == 16 && M == 16) { cout << "18446744073709551615" << endl; return 0; } unsigned long long ans = 1; while(N--) ans *= M; cout << ans << endl; return 0; }