#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;

string Add(string s1,string s2)//高精度加法模板
{
    int l1 = s1.size(),l2 = s2.size();
    if(l1<l2)swap(s1,s2);
    reverse(s1.begin(),s1.end());
    reverse(s2.begin(),s2.end());
    int car=0;
    string s = "";
    for(int i=0;i<s2.size();i++)
    {
        int num = (s1[i] -'0') + (s2[i] - '0') + car;
        car = num/10;
        char c = '0' + num % 10;
        s = s + c;
    }
    for(int i = s2.size();i<s1.size();i++)
    {
        int num = (s1[i] -'0') + car;
        car = num/10;
        char c = '0' + num % 10;
        s = s + c;
    }
    reverse(s.begin(),s.end());
    while(s[0]=='0')s.erase(0,1);
    return s;
    

}


int main() {
    int a,n;
    while(cin>>a>>n)
    {
        string s = "";
        char c = a + '0';
        string ans = "0";
        for(int i = 1;i<=n;i++)
        {
            s = s + c;
            ans = Add(ans,s);
        }
        cout<<ans<<endl;
    }
}
// 64 位输出请用 printf("%lld")