a=eval(input()) n=eval(input()) m=0 sum=0 for i in range(1,n+1): m=m*10+2 sum+=m print("{}".format(sum))