#include<stdio.h>#include<math.h>int main(){ int i,x,y,z; scanf("%d%d",&x,&y); z=((int)pow(x,y))%1000; if(x>=100) { printf("%d",z); } else { printf("%d",z); } return 0;}