#include <iostream>
using namespace std;
long pow(long a, long b) {
if(b==0){
return 1;
}
if(b%2==0){
return pow(a * a, b / 2);
}
return a * pow(a, b - 1);
}
int main() {
long a, b;
cin >> a >> b;
cout << pow(a,b);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKbG9uZyBwb3cobG9uZyBhLCBsb25nIGIpIHsKICBpZihiPT0wKXsKICAgIHJldHVybiAxOwogIH0KICBpZihiJTI9PTApewogICAgcmV0dXJuIHBvdyhhICogYSwgYiAvIDIpOwogIH0KICByZXR1cm4gYSAqIHBvdyhhLCBiIC0gMSk7Cn0KCmludCBtYWluKCkgewogIGxvbmcgYSwgYjsKICBjaW4gPj4gYSA+PiBiOwogIGNvdXQgPDwgcG93KGEsYik7CiAgcmV0dXJuIDA7Cn0=