#include<stdio.h>

int main()

{

int i,temp,count=0,num=0,sum=0;

scanf("%d%d",&count,&num);

temp=num;

for(i=1;i<=count;i++)

{

sum=sum+num;

num=num*10+temp;//常犯错误,初次编程会写成num=num*10+mun,但是忘记了num每次都会递归调用会变化的

}

printf("%d\n",sum);

return 0;

}