/*#include <stdio.h>
int f(int n)
{
if(n<1) return 1;
else return f(n-1)*n;
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",f(n));
return 0;
}
*/
/*
#include <stdio.h>
int f(int n)
{
if(n<=2) return 1;
else return f(n-1)+f(n-2);
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",f(n));
return 0;
}
*/
/*
#include <stdio.h>
int memo[51][51]={0};
int f(int a,int b)
{
if(memo[a][b]!=0) return memo[a][b];
if(a==1 || b==1) return 1;
return memo[a][b] =(f(a-1,b)+f(a,b-1))%100000000;
}
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",f(a,b));
return 0;
}
*/
/*
#include <stdio.h>
int memo[201]={0};
int f(int n)
{
if(memo[n]!=0) return memo[n];
if(n<=2) return 1;
else return memo[n] =(f(n-1)+f(n-2))%10009;
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",f(n));
return 0;
}
*/
#include <stdio.h>
memo [62][62]={0};
void f(int a,int b)
{
if(b<=1) return a;
else return f(b)*a;
}
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",f(a,b));
return 0;
}