#include "stdafx.h"
#include <iostream>
using namespace std;
double fast_pow(double a, unsigned int p)
{
double res;
int i = p / 2;
if (i > 0) {
res = a;
while (i > 0) {
res = res * res;
i /= 2;
}
}
else {
res = 1;
}
if (p % 2 != 0) {
res *= a;
}
return res;
}
int _tmain(int argc, _TCHAR* argv[])
{
double x;
int power;
cin >> x;
cin >> power;
cout << fast_pow(x, power) << endl;
system("pause");
return 0;
}