#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for (int i=0;i<(int)(n);i++)
template <typename T> bool chmax(T &a, const T& b) {if (a < b) {a = b; return true;}return false;}
template <typename T> bool chmin(T &a, const T& b) {if (a > b) {a = b; return true;}return false;}
const int MOD = 1000000007;
ll x = 10000000000;

int main(){
    int a,b,c,d;
    cin >> a >> b;
    cin >> c >> d;
    cout << b-c << endl;


}
#include <bits/stdc++.h>

using namespace std;

int main() {
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
	int a, b;
	cin >> a >> b;
	int c = a * 2 + 100;
	int d = c - b;
	cout << d;
}