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