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 (Python):
r = int(input())
g = int(input())
print(r+(g-r)*2)

Solution (Python):
s=int(input())
a=int(input())
print(2*a-s)

Solution (Python):
R = input()
G = input()
print 2*G-R

Solution (Python):


R =  int(input())
G = int(input())

print(2*G-R)

Solution (Python):
R = int(input())
G = int(input())
print(2 * G - R)

Solution (Python):





import numpy as np
a = int(input())
b = int(input())

print(2*b - a)

Solution (Python):
R = int(raw_input())
G = int(raw_input())

print 2*G - R

Solution (Python):
r=int(input())
g=int(input())
print(g*2-r)

Solution (Python):
old = int(input())
new = int(input())
print(2*new-old)

Solution (Python):
import sys,collections
sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

R = I()
G = I()

print(2*G-R)

Solution (Python):
R = int(input())
G = int(input())
print(2 * G - R)

Solution (Python):


r = int(input())
g = int(input())

        
print(r+(g-r)*2)

Solution (Python):
from collections import Counter

R = int(input())
G = int(input())

print(2*G-R)

Solution (Python):



from collections import defaultdict
from math import factorial as f
from fractions import gcd as g

a = int (raw_input ())
b = int (raw_input ())
print 2 * b - a

Solution (Python):
R = int(input())
G= int(input())
print(2*G-R)

Solution (Python):
r = int(input())
g = int(input())

print(g+(g-r))

Solution (Python):
num = int(input())
num2 = int(input())
print(num2+(num2-num))

Solution (Python):
r = int(input())
g = int(input())

print(2*g-r)

Solution (Python):
R = int(input())
G = int(input())
print(2*G-R)

Solution (Python):
r = int(input())
g = int(input())
print(g*2-r)

Solution (Python):
a = int(input())
b = int(input())
print(b * 2 - a)

Solution (Python):
a = int(input())
b = int(input())

b=b*2
b-=a
print(b)

Solution (Python):
r = int(input())
g = int(input())
print(2 * g - r)

Solution (Python):
a=int(input())
b=int(input())

print(a+2*(b-a))

Solution (Python):
R = int(input())
G = int(input())
print(2*G - R)

Solution (Python):
R,G = int(input()), int(input())
d = G-R
print(G+d)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    r = I()
    g = I()

    return r+(g-r)*2


print(main())

Solution (Python):
r = int(input())
g = int(input())
print(g * 2 - r)

Solution (Python):
R = input()
G = input()
print 2*G - R

Solution (Python):
now = int(input())
goal = int(input())
print(now+2*(goal-now))

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

r = ni()
g = ni()
print(2*g - r)

Solution (Python):
A = input()
B = input()
print 2*B-A

Solution (Python):

def get_ln_inputs():
    return input().split()


def map_list(fn, xs):
    return list(map(fn, xs))


def get_ln_int_inputs():
    return map_list(int, get_ln_inputs())


def main():
    R = get_ln_int_inputs()[0]
    G = get_ln_int_inputs()[0]
    print(R + 2* (G - R))
    return


main()

Solution (Python):
R = int(input())
G = int(input())
print(G*2-R)