from math import * n, a = map(int, input().split()) ans = 0 for i in range(n): ans += a*pow(10, i)*(n-i) print(floor(ans))