#include <bits/stdc++.h>
#include <iostream>
using namespace std;
//#define int long long int
#define out2(x,y) cout<<x<<" "<<y<<endl;
#define out(x) cout<<x<<endl;
#define forin for(int i=0;i<n;i++)
#define forjm for(int j=0;j<m;j++)
#define in(x) int x;cin>>x;
#define in2(x,y) int x,y;cin>>x>>y;
#define in3(x,y,z) int x,y,z;cin>>x>>y>>z;
#define MOD 1000000007


int32_t main()
{
    in2(a,b);
    int can=2*a+100;
    int ans=-b+can;
    out(ans);

    return 0;
}
/*
START BY THE NAME OF ALMIGHTY ALLAH
THIS WONT BE ACCEPTED
STOP_GIVING_UP

██╗███████╗████████╗██╗ █████╗ ██╗  ██╗
██║██╔════╝╚══██╔══╝██║██╔══██╗██║ ██╔╝
██║███████╗   ██║   ██║███████║█████╔╝
██║╚════██║   ██║   ██║██╔══██║██╔═██╗
██║███████║   ██║   ██║██║  ██║██║  ██╗
╚═╝╚══════╝   ╚═╝   ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝

*/
#include<bits/stdc++.h>
#define l(i,a,n)for(int i=a;i<n;i++)
#define pb push_back
#define in insert
#define mp make_pair
#define lw(v) sort(v.begin(),v.end());
#define hi(v) sort(v.begin(),v.end(),greater<long long>());
#define all(v) v.begin(),v.end()
#define filein freopen ("input.txt", "r", stdin)
#define fileout freopen ("output.txt", "w", stdout)
using namespace std;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    long long  t,r=1,r1=0,r2=0,k=0,a,b,c=0,m,d=0,n,e,f,x=0,g,p=0,q=0,y=0,z=0;
    vector<long long>v;
    vector<long long>u;
    vector<tuple<string,int,
           int>>mp;
    set<long long>s;
    std::vector<int>::iterator it;
    string  s1,s2,s3,s4;
    cin>>n>>m;
    cout<<((2*n)+100)-m<<endl;


}
