#include<iostream>
using namespace std;
int main() {
long long a,b,c=1;
cin>>a>>b;
for(int i=1; i<=b; i++) c*=a;
if(c/100%10==0&&c/10%10==0) cout<<0<<0<<c%10;
else if(c/100%10==0) cout<<0<<c/10%10<<c%10;
else cout<<c/100%10<<c/10%10<<c%10;
return 0;
}