#include <iostream>
#include <string>
#include <sstream>
using namespace std;

int main(void){
    int N, K;
    cin >> N >> K;
    int sum = 0;
    
    for(int z=1; z <= N; ++z) {
        
        for(int i=1; i <= K; ++i) {
            sum = sum + z * 100 + i;
        }
        
    }
    
    cout << sum << endl;
    
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using ll = long long;
using Graph = vector<vector<int>>;
const long long INF = 1LL << 60;
const int SINF = 1LL << 29;
const ll mod = 1000000000+7;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int main() {
    ll a, b;
    cin >> a >> b;
    for(int i=b-a; i>=1; i--) {
        int c;
        if(a % i == 0) c = 0;
        else c = a + i - a % i;
        if(c + i <= b) {
            cout << i << endl;
            return 0;
        }
    }
}