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):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque


from collections import Counter

from itertools import accumulate

from heapq import heapify,heappop,heappush


from functools import lru_cache


def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 10**9+7
    

    N = int(input())
    M = int(input())
    
    
    
    

    print(2*M-N)




if __name__ == "__main__":
    main()

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


import sys






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    r = ii()
    g = ii()
    print(g*2 - r)


if __name__ == "__main__":
    main()

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

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

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

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

ans = 2 * G - R
print(ans)

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(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):
R = int(input())
G = int(input())

print(-R+2*G)

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

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MIIZ = lambda: list(map(lambda x: x-1, MII()))

def main():
    r = II()
    g = II()
    print(2*g-r)

if __name__ == '__main__':
    main()

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(2*g-r)

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

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

Solution (Python):

import sys


def solve(R: int, G: int):
    print(G*2-R)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    R = int(next(tokens))  
    G = int(next(tokens))  
    solve(R, G)

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

r, g = [int(readline()) for _ in range(2)]
ans = r + (g - r) * 2
print(ans)

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(2 * g - r)

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

print((G-R)+G)

Solution (Python):
x = int(input())
y = int(input())
print(y*2-x)

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

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

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

print(g * 2 - r)

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


if __name__ == "__main__":
    main()

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

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

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

print(G*2-R)

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

print(2 * g - r)

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    R=int(input())
    G=int(input())
    print((G-R)*2+R)

if __name__ == '__main__':
    main()

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, G = map(int, open(0))  
print(G + (G - R))

Solution (Python):

"""
Created on Thu May 14 01:33:53 2020

@author: shinba
"""

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

print(2*g-r)

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

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):
S = int(input())
T = int(input())

print(2*T - S)

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):
r = int(input())
g = int(input())

x = 2*g-r
print(x)

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(2*G-R)

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

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

Solution (Python):
A=int(input())
B=int(input())
print(B+B-A)

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    R = int(input())
    G = int(input())

    
    
    ans = 2 * G - R

    print(ans)


if __name__ == "__main__":
    main()

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

print(2*G-R)

Solution (Python):
R,G=int(input()),int(input())
for i in range(-4500,4501):
    if int(R+i)==G:
        print(i+G)
        break

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

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

    ans = 2*g - r
    print(ans)


if __name__ == "__main__":
    main()

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

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

if __name__ == '__main__':

    ABC_76_A()

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(2*G-R)

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

R = ri()
G = ri()
print(G+(G-R))

Solution (Python):
def main():
    r,g = (int(input()) for _ in range(2))
    print(2*g - r)

if __name__ == '__main__':
    main()

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):
def resolve():
	r, g = [int(input()) for _ in range(2)]
	print(2*g - r)
resolve()

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(2*G-R)

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

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

Solution (Python):

import math

def main():
  R = int(input())
  G = int(input())
  
  print(2 * G - R)


if __name__ == '__main__':
  main()

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

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

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

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

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

print(2*g-r)

Solution (Python):
now_rate = int(input())
to_rate = int(input())

print(to_rate * 2 - now_rate)

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

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

Solution (Python):
print(-1*(int(input())-int(input())*2))

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

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

r = int(input())
g = int(input())
x = 2*g-r
print(x)

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

print(2*G - R)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

R = INT()
G = INT()
print(2*G-R)

Solution (Python):
a=float(input())
b=float(input())
print(int(b+(b-a)))

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

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

Solution (Python):
r,g = [int(input()) for i in range(2)]

print(g * 2 - r)

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

Solution (Python):
print(int(input())*(-1)+2*int(input()))

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

print(R+(G-R)*2)

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

Solution (Python):
i = int(input())
j = int(input())

print(-1*i + 2*j)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

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

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

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

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

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):
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(2*g-r)

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

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

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

Solution (Python):
r, g = [int(input()) for _ in range(2)]
print(2 * g - r)

Solution (Python):
R = input()
G = input()
R = int(R)
G = int(G)
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):
R=int(input())
G=int(input())
print(2*G-R)

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

print(2*G-R)

Solution (Python):
from sys import stdin

def main():
    n1 = int(stdin.readline())
    n2 = int(stdin.readline())

    print(2 * n2 - n1)

if __name__ == '__main__':
    main()

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(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):
r,g=[int(input()) for _ in range(2)]
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):
r=int(input())
g=int(input())
print(2*g-r)

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

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):
R=int(input())
G=int(input())
ans=2*G-R
print(ans)

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):

def resolve():
    R = int(input())
    G = int(input())
    print(2*G-R)


if '__main__' == __name__:
    resolve()

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

Solution (Python):
a,b = (int(input()) for _ in range(2))

print(b*2 - a)

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

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

Solution (Python):
m=int(input())
n=int(input())
print(2*n-m)

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

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

print(2*b-r)

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

print(2*b-r)

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

print(g*2-r)

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

print(g * 2 - r)

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

if r > g:
    sub = r - g
    print(g - sub)
else:
    sub = g - r
    print(g + sub)

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

print(g*2-r)

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

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):

url = "https://atcoder.jp//contests/abc076/tasks/abc076_a"

def main():
    ans = 0
    t = []
    for i in range(2):
        t.append(int(input()))
    print(2 * t[1] - t[0])

if __name__ == '__main__':
    main()

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

Solution (Python):
x=int(input())
y=int(input())
print(2*y-x)

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):
icase=0    
if icase==0:
    r=int(input())
    g=int(input())
    print(2*g-r)

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

Solution (Python):
N=int(input())
S=int(input())
ans=S*2-N
print(ans)

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

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

s = (g-r)*2
sum = r + s
print(sum)

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

num=g-r
print(num+g)

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

num=g-r
print(num+g)

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

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

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

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

print(2 * g - r)

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

if R < G:
    print(R + 2*abs(G-R))
else:
    print(R - 2*abs(G-R))

Solution (Python):
r,g = (int(input()) for _ in range(2))
print(g*2-r)

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

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

Solution (Python):
R,G = [int(input()) for i in range(2)]

print(G*2-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):
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):
R = int(input())
G = int(input())
print(2*G-R)

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

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

Solution (Python):
import io

print(-int(input())+2*int(input()))

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

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

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

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

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

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

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

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):
a = int(input())
b = int(input())
ans = (b*2-a)
print(ans)

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

ans = 2 * g - r
print(ans)

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

p = 2 * g - r
print(p)

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):
print(int(input())*-1+int(input())*2)

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

Solution (Python):

R = int(input())
G = int(input())
ans = G * 2 - R
print(ans)

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(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):
R = int(input())
G = int(input())

print(2 * G - R)

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

answer = (2 * G) - R 

print(answer)

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

print(g*2-r)

Solution (Python):
a = int(input())
b = int(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(2*g-r)

Solution (Python):
import sys

r, g = map(int, sys.stdin.read().split())

def main():
    res = 2 * g - r
    print(res)

if __name__ ==  '__main__':
    main()

Solution (Python):

r, g = [int(input()) for _ in range(2)]
print(g * 2 - 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):
r,g=int(input()),int(input())
print(2*g-r)

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = int(input())
    b = int(input())

    print(b*2-a)

Solution (Python):
R, G = [int(input()) for _ in range(2)]

print(2 * G - R)

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

Solution (Python):
RG = [int(input()) for _ in range(2)]
print(RG[1]*2 - RG[0])

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

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

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

Solution (Python):
import math
import string
import collections
from collections import Counter


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

r = int(input())
g = int(input())
print(g*2-r)

Solution (Python):
R,G=map(int,open(0));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):
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(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):
r = int(input())
g = int(input())
print(g*2-r)

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

Solution (Python):

import sys
try:
    from typing import List
except ImportError:
    pass


def solve(R: int, G: int):
    print(2 * G - R)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    R = int(next(tokens))  
    G = int(next(tokens))  
    solve(R, G)


if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):
import math

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

print(G*2-R)

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

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

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

print(2*g - r)

Solution (Python):
print(-1*int(input())+2*int(input()))

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

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

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

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

print(b - a + b)

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

print(2*g-r)

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

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

Solution (Python):
R, G =[int(input()) for i in range(2)]
print(G * 2 - R)

Solution (Python):
l = int(input())
l2 = int(input())
print(l+(l2-l)*2)

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

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

ans = 2 * g - r
print(ans)

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

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

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

print(2*g-r)

Solution (Python):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

r, g = nin(2)

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):
r = int(input())
g = int(input())

print(2*g - r)

Solution (Python):

def main():
    import sys
    
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations
    
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    

    

    R = int(input())
    G = int(input())
    print(G*2-R)

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    R = int(sys.stdin.readline().rstrip())
    G = int(sys.stdin.readline().rstrip())
    print(2*G-R)



if __name__ == '__main__':
    main()

Solution (Python):
x=int(input())
m=int(input())
print(m*2-x)

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):

r=int(input())
g=int(input())
print(g*2-r)

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

a = 2 * G - R
print(int(a))

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

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    R = float(sys.stdin.readline().rstrip())
    G = float(sys.stdin.readline().rstrip())
    print(int(R+(G-R)*2))


if __name__ == '__main__':
    main()

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

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

output = (G*2) - R
print(output)

Solution (Python):
r,g=[int(input()) for i in range(2)]

print(2*g-r)

Solution (Python):









import sys



ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    r, g = map(int, open(0).read().split())
    print(r+(g-r)*2)

if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin

r = int(stdin.readline().rstrip())
g = int(stdin.readline().rstrip())

print(2*g - r)

Solution (Python):
a,b = [int(input()) for i in range(2)]
print(2 *b - a)

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

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

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

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

Solution (Python):
a=int(input())
b=int(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())
ans = 2 * G - R
print(ans)

Solution (Python):
A, G = [int(input()) for i in range(2)]
print(2*G - A)