#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, M; cin >> N >> M; ll ans = 1; while(N--) ans *= M; cout << ans << endl; return 0; }