#include <iostream>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <math.h>
//#include <queue>
//#include <stack>
//#include <iomanip>

// sometimes used
//#include <set>
//#include <map>
//#include <numeric>
//#include <list>
//#include <deque>
//#include <unordered_map>

typedef long long LL;
//typedef long double LD;
//typedef pair<LL, LL> P;
using namespace std;
//using Graph = vector<vector<LL>>;
 
const LL MOD=1000000007;
//const LL MOD=998244353;
//const LL MAX=100100;
//const LL NIL=-1;
//const LL INF=2000000000000000000;
//const LL SEG_VAL = 1 << 19;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);

    LL t;
    LL n;
    cin >> t >> n;
    vector<pair<LL, LL>> vr;
    LL cur=1;
    LL i=0;
    while(vr.size()<11){
        if((i*t)/100>=cur){
            vr.push_back(make_pair(i, (i*t)%100));
            cur*=2;
        }
        i++;
    }

    LL num=0;
    LL res=0;

    /*
    for(LL i=0; i<11; i++){
        cout << vr[i].first << " " << vr[i].second << endl;
    }
    */

    while(n>0){
        //cout << n << " " << num << " " << res << endl;
        if(n<2048){
            while(n>0){
                num++;
                res+=t;
                if(res/100>=1){
                    res-=100;
                    n--;
                    //cout << num << " " << res << endl; 
                }
            }
        }else{
            num+=vr[10].first;
            n-=1024;
            n-=(res+vr[10].second)/100;
            res=(res+vr[10].second)%100;
        }
    }

    cout << num+(num*t/100)-1 << endl;

    return 0;
}

#include <iostream>
//#include <vector>
//#include <string>
//#include <algorithm>
//#include <math.h>
//#include <queue>
//#include <stack>
//#include <iomanip>

// sometimes used
//#include <set>
//#include <map>
//#include <numeric>
//#include <list>
//#include <deque>
//#include <unordered_map>

typedef long long LL;
//typedef long double LD;
//typedef pair<LL, LL> P;
using namespace std;
//using Graph = vector<vector<LL>>;
 
//const LL MOD=1000000007;
//const LL MOD=998244353;
//const LL MAX=100100;
//const LL NIL=-1;
//const LL INF=2000000000000000000;
//const LL SEG_VAL = 1 << 19;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);

    LL n;
    LL k;
    cin >> n >> k;
    LL ans=0;
    for(LL i=1; i<=n; i++){
        for(LL j=1; j<=k; j++){
            ans+=100*i+j;
        }
    }

    cout << ans << endl;

    return 0;
}
