include <stdio.h>int main (){ int a, n; int t = 0, s = 0; scanf("%d %d", &a, &n); while(n--){ t = t*10+a; s += t; } printf("%d\n", s); return 0;}