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(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):
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):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def I():
    
     return int(sys.stdin.readline().rstrip())
def LI():
    
     return list(map(int,sys.stdin.readline().rstrip().split()))
def S():
    
     return sys.stdin.readline().rstrip()
def LS():
    
     return list(sys.stdin.readline().rstrip().split())

R=I()
G=I()

x=2*G-R
print(x)

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def I():
    
    return int(sys.stdin.readline().rstrip())
def LI():
    
    return list(map(int,sys.stdin.readline().rstrip().split()))
def S():
    
    return sys.stdin.readline().rstrip()
def LS():
    
    return list(sys.stdin.readline().rstrip().split())

R = I()
G = I()

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

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    R = I()
    G = I()

    ans = 2 * G - R
    print(ans)

if __name__ == '__main__':
    resolve()

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())
if (0<=R and R<=4500) and (0<=G and G<=4500):
    print(2*G-R)

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

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

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

Solution (Python):
with open(0) as f:
    R, G = map(int, f.read().split())
print(2*G-R)

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

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



answer = 2 * G -R
print(answer)

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

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

print(a+(b-a)*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())
print(2*G-R)

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

Solution (Python):
def main():
    r, g = int(input()), 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(G + (G - R))

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

Solution (Python):



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

print(G * 2 - R)

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

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

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

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

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

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

Solution (Python):



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

b = 2*G - R
print(b)

Solution (Python):




















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



result = g * 2  - r

print(result)

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(int(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())


performance = G * 2 - R


print(performance)

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



answer = 2 * g - r


print(answer)

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

rating = G * 2 - R
print(rating)

Solution (Python):

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


answer = 2 * G - R


print(answer)

Solution (Python):
current_rating = int(input())
final_rating = int(input())
performance = final_rating * 2 - current_rating
print(performance)

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

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

Solution (Python):

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



if 0 <= R and G <= 4500:
    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())
performance = 2 * g - r
print(performance)

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


print(G*2 - R)

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

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

R += (G - R) * 2

print(R)

Solution (Python):


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

B = G * 2 - R
print(B)

Solution (Python):
def main():
  my_rate = int(input())
  avarage_rate = int(input())
  
  target_rate = (avarage_rate * 2) - my_rate
  
  print(target_rate)

if __name__ == '__main__':
  main()

Solution (Python):

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


Target = (G * 2) - R


print(Target)

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

Solution (Python):

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

print(G * 2 - R)

Solution (Python):
S_list = [int(input()) for i in range(2)]

mokuhyou = 2 * S_list[1] - S_list[0]
print(mokuhyou)

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

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

Solution (Python):





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








x = (2 * G) - R



answer = x
print(answer)

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

Solution (Python):

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


answer = 2 * g - r

print(answer)

Solution (Python):
rrate = int(input())
nrate = int(input())

print(nrate * 2 - rrate)

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




answer = 2 * G - R
print(answer)

Solution (Python):
last_rating = int(input())
average_rating = int(input())

this_time_rating = 2 * average_rating - last_rating

print(this_time_rating)

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

b = G * 2 - a

print(b)

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

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
R,G = (int(input()) for T in range(0,2))
print(2*G-R)

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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush

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

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

Solution (Python):










import sys

def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]

def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))

sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)


R = iIn()
G = iIn()

ans = 2 * G - R
print(ans)

Solution (Python):









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

print(2*g-r)

Solution (Python):

def main():
    r = int(input())    
    g = int(input())    
    print(g - r + g)


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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
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(((g - r) * 2) + r)

Solution (Python):
print -int(raw_input()) + (int(raw_input()) << 1)

Solution (Python):
a,av =  int(raw_input()), int(raw_input())
print 2*av - a

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, G = [int(input()) for _ in range(2)]
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, G = [int(input()) for _ in range(2)]
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):
a = [int(input()) for i in range(2)]
my_result = 2 * a[1] - a[0]
print(my_result)

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

















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
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
import numpy as np
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):
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(int(g * 2 - r))

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    R, G = map(int, read().split())

    print(2 * G - R)

    return


if __name__ == '__main__':
    main()

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

print((2*g)-r)

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

t = g-r

print(g+t)

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())

print(-I()+2*I())

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

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


if __name__ == "__main__":
    solve()

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

N = int(input())
K = int(input())

ans = 1

print(2*K-N)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

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

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

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

print(2*G - R)

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

print(-r+2*g)

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())
res = 2 * b - a
print(res)

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

Solution (Python):
def main():
    n = int(input())
    s = int(input())
    

    print(2*s-n) 
if __name__ == '__main__':
    main()

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

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

print(g*2 -r)

Solution (Python):
R, G = [int(input()) for i 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(G+G-R)

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

print(2*g-r)

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

ans = nextt * 2 - current

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

    ans = g + g-r
    print(ans)
resolve()

Solution (Python):
R=int(input())
G=int(input())
a=abs(R-G)
if G>R:
    print(max(R,G)+a)
else:
    print(min(R,G)-a)

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
R = I()
G = I()
x = G - R
print(G + x)

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

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

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

print((2*b)-a)

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b = ri(), ri()
print(a + (b-a)*2)

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

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

    print(g+g-r)
 
if __name__ == '__main__':
    main()

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

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):
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, g = int(input()), 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,g = [int(input()) for i 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):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

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

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

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

Solution (Python):
import sys
R = int(input())
G = int(input())
if not (0 <= R <= 4500 and 0 <= G <= 4500):
    sys.exit()

print ( G * 2 - R )

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

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

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

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

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

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

print(x)

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

Solution (Python):
r,g=map(int,open(0).read().split());print((g*2)-r)

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

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

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

print(X)

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

b = 2*G - R

print(b)

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

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

answer = 2 * g - a
print(answer)

Solution (Python):


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

print((2 * g) - r)

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

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

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

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

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

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

print(g*2-r)

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

sa = G-R
print(G+sa)

Solution (Python):
def main():
    r = int(input())
    target = int(input())
    diffs = target - r
    print(r+diffs*2)


if __name__ == '__main__':
    main()

Solution (Python):
r, g = map(int, open(0).read().split())
print(2 * g - r)

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

Solution (Python):
def actual(R, G):
    return (G - R) + G


R = int(input())
G = int(input())
print(actual(R, G))

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

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

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

a=int(input())
b=int(input())
ans=2*b-a
print(ans)

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):
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=map(int,open(0).read().split());print(g*2-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(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) * 2 + R)

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

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

x = 2*g - r

print(x)

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

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


N = 2*G -R

print(N)

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

print(2*G-R)

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

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