#include<stdio.h>
main()
{
int a,n,x,i=1;
scanf("%d %d",&a,&n);
int sum=a;
x=a;
while(i<=(n-1)){
a = a*10+x;
sum += a;
i++;
}
printf("%d",sum);
return 0;
}
#include<stdio.h>
main()
{
int a,n,x,i=1;
scanf("%d %d",&a,&n);
int sum=a;
x=a;
while(i<=(n-1)){
a = a*10+x;
sum += a;
i++;
}
printf("%d",sum);
return 0;
}