#include<bits/stdc++.h> using namespace std; int main() { int a,n,s=0,x,i; cin>>a>>n; x=a; for(i=1;i<=n;i++) {s+=a; a=10*a+x;} cout<<s; }