Problem:
Score : 100 points

Problem Statement

Takahashi is a user of a site that hosts programming contests.

When a user competes in a contest, the rating of the user (not necessarily an integer) changes according to the performance of the user, as follows:

Let the current rating of the user be a.

Suppose that the performance of the user in the contest is b.

Then, the new rating of the user will be the avarage of a and b.

For example, if a user with rating 1 competes in a contest and gives performance 1000, his/her new rating will be 500.5, the average of 1 and 1000.

Takahashi's current rating is R, and he wants his rating to be exactly G after the next contest.

Find the performance required to achieve it.

Constraints

0 \leq R, G \leq 4500

All input values are integers.

Input

Input is given from Standard Input in the following format:

R
G

Output

Print the performance required to achieve the objective.

Sample Input 1

2002
2017

Sample Output 1

2032

Takahashi's current rating is 2002.

If his performance in the contest is 2032, his rating will be the average of 2002 and 2032, which is equal to the desired rating, 2017.

Sample Input 2

4500
0

Sample Output 2

-4500

Although the current and desired ratings are between 0 and 4500, the performance of a user can be below 0.

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

//# define FLAG
///delet....................................
#define GGG
#include    <bits/stdc++.h>
using namespace std;
#define     FOR(i,a,n)      for(register int i=a;i<=n;++i)
#define     FIR(i,n,a)      for(register int i=n;i>=a;--i)
#define     FOR_(i,a,n)     FOR(i,a,n-1)
#define     FIR_(i,n,a)     FIR(i,n-1,a)
#define     VOR(i,a)        for(register int i=0,n=a.size();i<n;++i)
#define     SOR(i,a)        for(register auto i=a.begin();i!=a.end();++i)
#define     all(a)          (a).begin(),(a).end()
#define     vlb(a,n)        (lower_bound(all(a),n)-a.begin())
#define     vub(a,n)        (lower_bound(all(a),n)-a.begin())
#define     mem(a,b)        memset(a,b,sizeof(a))
#define     sz(a)           ((int)a.size())
#define     pw(x)           ((LL)1<<(x))
#define     lowbit(x)       ((x)&(-x))
#define     bug             puts("H");
#pragma     comment(linker,"/STACK:1024000000,1024000000")
#define     debug(...)      fprintf(stderr,__VA_ARGS__)
#define     IOS             ios::sync_with_stdio(false)
#define     lch             p<<1,l,mid
#define     rch             p<<1|1,mid+1,r
#define     queue_          priority_queue
#define     pb              push_back
#define     mp              make_pair
#define     lb              lower_bound
#define     ub              upper_bound
#define     ff              first
#define     ss              second
typedef     long long               LL;
typedef     unsigned long long      ULL;
typedef     pair<int,int >         PII;
typedef     pair<int,PII >         PIII;
typedef     vector<int >            VI;
typedef     vector<PII >            VII;
typedef     vector<PIII >           VIII;
const     int           dx[]= { 1, 0,-1, 0, 1,-1, 1,-1};
const     int           dy[]= { 0, 1, 0,-1, 1,-1,-1, 1};
const     long long     LINF=0xfcfcfcfcfcfcfcfll;
const     double        pi=3.141592653589793238462643383279502881l;
const     double        ee=2.718281828459;
const     double        eps=0.00000001;
const     int           INF=0x3f3f3f3f;
const     int           MOD=1000000007;
inline LL powmod(LL x,LL n,LL mod=MOD,LL res=1) { for(; n; x*=x%mod,n>>=1)if(n&1)res*=x%mod; return res; }
template<typename T>inline T max(T a,T b,T c) { return max(a,max(b,c)); }
template<typename T>inline T min(T a,T b,T c) { return min(a,min(b,c)); }
template<typename T>inline T max(T a,T b,T c,T d) { return max(a,max(b,c,d)); }
template<typename T>inline T min(T a,T b,T c,T d) { return min(a,min(b,c,d)); }
inline int div_10(int n,int q=0) { q=(n>>1)+(n>>2),q+=(q>>4),q+=(q>>8),q+=(q>>16),q>>=3; return q+(n-(q<<3)-(q<<1)>9); }
inline LL div_10(LL n,LL q=0) { q=(n>>1)+(n>>2),q+=(q>>4),q+=(q>>8),q+=(q>>16),q+=(q>>32),q>>=3; return q+(n-(q<<3)-(q<<1)>9); }
static char bfi[1000000],*ci=bfi-1,*cl=bfi-1,bfo[1000000],*co=bfo-1,chr; inline bool dig() { return (chr>='0'&&chr<='9')?1:0; }
#ifdef GGG
#define     hr              ptc('\n')
#define     kb              ptc(' ')
inline char gtc() { return ci==cl&&(cl=(ci=bfi-1)+fread(bfi,1,1000000,stdin),ci==cl)?EOF:*++ci; }
inline double readbit(double &ret,double bit=0.1) { if(chr=gtc(),dig())ret+=(chr-'0')*bit,readbit(ret,bit*0.1); }
inline LL read() { while(chr=gtc(),!(dig()||chr=='-')); LL sum=0,flag=(chr=='-'?(chr=gtc()):0); while(dig())sum=(sum<<3)+(sum<<1)+chr-'0',chr=gtc(); return flag?-sum:sum; }
inline bool read(LL &res,bool flag=0,bool f=0,LL sum=0) { while(chr=gtc(),!(dig()||(chr=='-'?(chr=gtc(),flag=1):0))); while(dig())sum=(sum<<3)+(sum<<1)+chr-'0',f=1,chr=gtc(); return f?(res=flag?-sum:sum,1):0; }
inline bool read(double &ret,bool flag=0,LL sum=0) { while(chr=gtc(),!(dig()||(chr=='-'?(chr=gtc(),flag=1):0))); while((dig())?1:(ret=sum,0))sum=(sum<<3)+(sum<<1)+chr-'0',chr=gtc(); if(chr=='.')readbit(ret); return ret?(ret=flag?-ret:ret):0; }
inline bool read(char *p,bool f=0) { while(chr=gtc(),chr==' '||chr=='\n'); while(chr!='\n'&&chr!=EOF)*p++=chr,chr=gtc(),f=1; return (*p=0,f); }
inline void ptc(char ch) { if(*++co=ch,co==bfo+999999)fwrite(bfo,1,co-bfo+1,stdout),co=bfo-1; }
template<typename T>inline void out(T x) { if(x<0)ptc('-'),x=-x; if(x>9)out(div_10(x)); ptc(x%10+'0'); }
inline void out(char *p) { while(*p)ptc(*p++); }
inline void write() { fwrite(bfo,1,co-bfo+1,stdout); co=bfo-1; }
#else
#define     hr              putchar('\n')
#define     kb              putchar(' ')
inline double readbit(double &ret,double bit=0.1) { if(chr=getchar(),dig())ret+=(chr-'0')*bit,readbit(ret,bit*0.1); }
inline LL read() { while(chr=getchar(),!(dig()||chr=='-')); LL sum=0,flag=(chr=='-'?(chr=getchar()):0); while(dig())sum=(sum<<3)+(sum<<1)+chr-'0',chr=getchar(); return flag?-sum:sum; }
inline bool read(LL &res,bool flag=0,bool f=0,LL sum=0) { while(chr=getchar(),!(dig()||(chr=='-'?(chr=getchar(),flag=1):0))); while(dig())sum=(sum<<3)+(sum<<1)+chr-'0',f=1,chr=getchar(); return f?(res=flag?-sum:sum,1):0; }
inline bool read(double &ret,bool flag=0,LL sum=0) { while(chr=getchar(),!(dig()||(chr=='-'?(chr=getchar(),flag=1):0))); while((dig())?1:(ret=sum,0))sum=(sum<<3)+(sum<<1)+chr-'0',chr=getchar(); if(chr=='.')readbit(ret); return ret?(ret=flag?-ret:ret):0; }
inline bool read(char *p,bool f=0) { while(chr=getchar(),chr==' '||chr=='\n'); while(chr!='\n'&&chr!=EOF)*p++=chr,chr=getchar(),f=1; return (*p=0,f); }
template<typename T>inline void out(T x) { if(x<0)putchar('-'),x=-x; if(x>9)out(div_10(x)); putchar(x%10+'0'); }
inline void out(char *p) { while(*p)putchar(*p++); }
#endif
/**___________________________head____________________________**/



int main() {
    IOS;
#ifdef FLAG
    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
#endif
    int a,b;
    cin>>a>>b;
    cout<<b*2-a<<endl;
    return 0;
}










///delete FLAG...................................................