#include <bits/stdc++.h>

using namespace std;

using ll = long long;

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

    return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define rep(i,a,b) for(auto i = a;i<b;i++)
#define ll long long

void solve(){
int a,b;
cin>>a>>b;
cout<<abs((2*a+100)-b)<<endl;
}
 
 
int main()
{
int T = 1;
// cin>>T;
// int i = 1;
while(T--){
// cout<<"Case #"<<i<<": ";
solve();
}
return 0;
}