#include<bits/stdc++.h>
using namespace std;

typedef long long  ll;
typedef long double ld;

#define speed ios_base::sync_with_stdio(false);cin.tie(NULL)
#define mod  1000000007

const int N = 100005;

ll sigma(ll n)
{
        return (n*(n+1))/2;
}
signed main()
{
        speed;
        int n,k;
        cin>>n>>k;
        ll ans=100*k*sigma(n);
        ans+=sigma(k)*n;
        cout<<ans<<endl;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
 
int main()
{
    fast_io;
    int n, k;
    cin >> n >> k;

    string res = "";
    ll sum = 0;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= k; j++)
        {
            res.clear();
            res += to_string(i);
            res += '0';
            res += to_string(j);
            sum += stoll(res);
        }
    }

    cout << sum << endl;
    return 0;
}