#include using namespace std; using ll = long long; int main() { ll n, m; cin >> n >> m; ll r = 1; for (; n > 0; n--) r *= m; cout << r << endl; }