#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int a,b;
	int r=1;
	cin>>a>>b;
	while(b)
	{
		if(b&1)
		{
			r=r*a;
		}
		a=a*a;
		b=b>>1;
	}
	cout<<r<<endl;
	return 0;
}