def f(a,n):i = 0l = 0s = 0while i <= (n-1) :m = a*(10**i)l += ms +=l#print(m,l,s)i += 1print(s)
a = int(input('a='))n = int(input('n='))
f(a,n)