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

int main(){
  int A,B; cin >> A >> B;
  int limit = 2*A + 100;
  cout << limit - B << endl;
}
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(i, n) for (int i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define INF 1000000000000
typedef long long ll;

int main()
{
  int a, b, ans = 0;
  cin >> a >> b;

  cout << 2 * a + 100 - b << endl;
}