


#include <bits/stdc++.h>

#define loop(s, e, i) for (int i = s; i < e; ++i)
#define print(s) cout << s << endl;
#define DIV 1000000007
#define ll long long
using namespace std;

const int INF = 1e9+7;

/*
浮動小数点の入力
cout << fixed << setprecision(9) << endl;
*/

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

  ll A, B;
  cin >> A >> B;

  ll mx = 2*A+100;
  ll left = mx - B;
  if (left >= 0) {
    print(left);
  } else {
    print(0);
  }
}

#include<bits/stdc++.h>
using namespace std;
int main()
{

   long long int a,b;
   cin>>a>>b;
   cout<<((2*a)+100)-b<<endl;
   return 0;






}
