#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int a,b,res,ans;
    cin >>a>>b;
    ans=(2*a)+100;
    if(b<=ans)
    {
        res=ans-b;
    }
    cout<<res<<endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;

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


int main(){
    int t=1;
    //cin>>t;
    while(t--){
        solve();
    }
    return 0;
}