#include<stdio.h>
int main(int argc, char const *argv[])
{
int a, b, i, s = 0;
int arr[10] = {};
scanf("%d %d", &a, &b);
arr[0] = a;
for (i = 1; i < b; i++)
{
arr[i] = arr[i - 1] * 10 + arr[0];
s += arr[i];
}
printf("%d", s + arr[0]);
return 0;
}