#include <fstream>
using namespace std;
ifstream fin("cruel1.in");
ofstream fout("cruel1.out");
long long qpow(long long x,long long y)
{
if(y==0)
return 1;
long long r=qpow(x,y/2);
r*=r;
if(y%2)
r*=x;
return r;
}//quickpow by XPK
int main()
{
long long n,p;
long long ans;
fin>>n>>p;
ans=qpow(n,p);
fout<<ans<<endl;
fin.close();
fout.close();
return 0;
}//signed by XPK