#include using namespace std; using ll = long long; int main() { ll n, m; cin >> n >> m; cout << pow(m, n) << endl; }