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