#include <bits/stdc++.h>
using namespace std;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int a, b;
    cin >> a >> b;
    cout << 2 * a + 100 - b << "\n";
    return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
using ll = long long ;
#define rep(i,n) for (int i=0; i < (n); ++i)

int main() {
    int a,b ;
    cin >> a >> b ;
    cout << max((2*a+100)-b,0) << endl ;
 return 0 ;
}  
