#include <bits/stdc++.h> using namespace std; long long a, b, c = 1; int main() { cin >> a >> b; while(b --) { c *= a; if(c > 2147483647){ cout << "-1"; return 0; } } cout << c; return 0; }