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