#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
#define ll long long
#define nl '\n'
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define vi vector<int>
#define pii pair<int, int>
#define rep(i, a, b) for(int i = (a); i < (b); i++)
using namespace std;
vector<string> vec_splitter(string s) {
    s += ',';
    vector<string> res;
    while(!s.empty()) {
        res.push_back(s.substr(0, s.find(',')));
        s = s.substr(s.find(',') + 1);
    }
    return res;
}
void debug_out(
vector<string> __attribute__ ((unused)) args,
__attribute__ ((unused)) int idx, 
__attribute__ ((unused)) int LINE_NUM) { cerr << endl; } 
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
    if(idx > 0) cerr << ", "; else cerr << "Line(" << LINE_NUM << ") ";
    stringstream ss; ss << H;
    cerr << args[idx] << " = " << ss.str();
    debug_out(args, idx + 1, LINE_NUM, T...);
}
#define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__)
void solve() {
    int n,k;
    cin>>n>>k;
    int sumn = 0;
    for(int i =1;i<=n;i++){
        for(int j = 1;j<=k;j++){
            string room_no = to_string(i)+"0"+to_string(j);
            sumn+=stoi(room_no);
        }
        
    }
    cout<<sumn<<nl;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int te = 1;
    //cin >> te;
    while(te--) solve();
}
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i <(n); ++i)
using namespace std;
using ll = long long;
using p = pair<int, int>;

int main(){
    ll ii, jj, count(0),flor(0);
    cin >> ii>>jj;
    rep(i,jj){
        count+=i+1;
    }
    rep(i,ii){
        flor+=i+1;
    }
    count =100 * flor * jj + count*ii;
    cout << count;
    return 0;
}