#include <bits/stdc++.h>
 
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<long long> Vll;
ll mm=1000000000;ll MM=mm+7;
#define rep(i, n) for(int i=0;i<n;i++)
#define PI 3.141592653589793
 

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



#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,a,n) for(ll i=a;i<n;i++)
#define rev(i,n,a) for(ll i=n-1;i>=a;i--)
#define f first
#define s second
#define vll vector<ll>
#define vvll vector<vector<ll>>
#define vpii vector<pair<int,int>>
#define vpll vector<pll>
#define pll pair<ll,ll>
#define secreterror() ios_base::sync_with_stdio(false);cin.tie(NULL);

void solve(){

    ll a,b;
    cin>>a>>b;

    ll ans=2*a + 100;
    cout<<max((ll)0,ans-b)<<endl;

    
}


int main()
{
    secreterror()
    // ll t;
    // cin>>t;
    // //while(t--){
        solve();
        
    //}

}