#include<bits/stdc++.h>
using namespace std;
int t;
int a,b,c;
int main() {
freopen("csp2022pj_pow.in","r",stdin);
freopen("csp2022pj_pow.out","w",stdout);
cin>>a>>b;
c=(pow(a,b));
if(c<0) {
cout<<-1;
} else {
cout<<c;
}
cout<<endl;
return 0;
}
//很简单的一道题,用pow函数就行了