#include <iostream>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <utility>
#include <queue>
#include <deque>
#include <iomanip>
#include <cmath>

// 最大公約数
template<typename T> T gcd(T a, T b)
{
	if (a < b) {
		return gcd(b, a);
	}
	else {
		const T mod = a % b;
		if (mod == 0) {
			return b;
		}
		else {
			return gcd(b, mod);
		}
	}
}

int main()
{
	int A, B;
	std::cin >> A >> B;
	const int max = 2 * A + 100;
	std::cout << max - B << std::endl;
	return 0;
}

#include <bits/stdc++.h>

#define Fast cin.tie(0), ios::sync_with_stdio(0)
#define All(x) x.begin(), x.end()
#define louisfghbvc int t; cin >> t; while(t--)
#define sz(x) (int)(x).size()
using namespace std;
typedef long long LL;
typedef pair<LL, LL> ii;
typedef vector<LL> vi;

template<typename T> istream& operator>>(istream &is, vector<T> &v) { for(auto &it : v) is >> it; return is; }
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << '{'; string sep = ""; for(const auto &x : v) os << sep << x, sep = ", "; return os << '}'; }
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }

void dbg_out() { cerr << " end.\n"; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }

const int N = 2e5+5;

void solve(){
    int a, b;
    cin >> a >> b;
    cout << 2*a +100 - b << "\n";
}
int main()
{
    Fast;
    //louisfghbvc
        solve();
    return 0;
}
