#include<iostream> using namespace std; int main(){ int a,n,b,s; cin>>a>>n; b=a; s=0; for(int i=1;i<=n;i++){ s+=b; b=a*11; } cout<<s; return 0; }