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.



Sample input:
2002
2017


Sample output:
2032

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(g * 2 - r)

Submission status: Accepted

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

Submission status: Accepted

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

print(-1*i + 2*j)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC076A

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

Submission status: Accepted

Solution code:
from sys import stdin

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

    print(2 * n2 - n1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

print(b*2 - a)

Submission status: Accepted

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

Submission status: Accepted

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

print(2*b-r)

Submission status: Accepted

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

print(2*b-r)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

print( 2 * G - R)

Submission status: Accepted

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

print(2*G-R)

Submission status: Accepted

Solution code:
icase=0    
if icase==0:
    r=int(input())
    g=int(input())
    print(2*g-r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

num=g-r
print(num+g)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = int(input())
g = int(input())
# a, b = map(int, input().split())
# s = input()
print(2 * g - r)

Submission status: Accepted

Solution code:
r = int(input())
g = int(input())
#  =map(int,input().split())
#  =list(map(int,input().split()))
print(g*2-r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(G*2-R)

Submission status: Accepted

Solution code:
import io

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print( 2*G - R )

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


print(2*g-r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 2 * g - r
print(ans)

Submission status: Accepted

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

p = 2 * g - r
print(p)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
R = int(input())
G = int(input())
ans = G * 2 - R
print(ans)

Submission status: Accepted

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

print(2*g-r)

Submission status: Accepted

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

answer = (2 * G) - R 

print(answer)

Submission status: Accepted

Solution code:
import sys

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

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

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
# ABC 076: A – Rating Goal
r, g = [int(input()) for _ in range(2)]
print(g * 2 - r)

Submission status: Accepted

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

Submission status: Accepted

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

print(2 * G - R)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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


# coordinates
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)

Submission status: Accepted

Solution code:
R,G=map(int,open(0));print(2*G-R)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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))  # type: int
    G = int(next(tokens))  # type: int
    solve(R, G)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

print(G*2-R)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
r=int(input())
g=int(input())
# (r+x)=2g
print(2*g - r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(b - a + b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 2 * g - r
print(ans)

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Sat Mar 14 11:05:23 UTC 2020
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)

Submission status: Accepted

Solution code:
#abc075 a 
r=int(input())
g=int(input())
print(2*g-r)

Submission status: Accepted

Solution code:
#pypyは内包表記使わない
def main():
    import sys
    #input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations
    #from itertools import accumulate, product
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    #from operator import itemgetter

    #mod = 1000000007

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Rating Goal
r=int(input())
g=int(input())
print(g*2-r)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(2*g-r)

Submission status: Accepted

Solution code:
# import bisect
# from collections import Counter, defaultdict, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

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

Submission status: Accepted

Solution code:
from sys import stdin

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

print(2*g - r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
##Rating Goal

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#076_A
r=int(input())
g=int(input())
print(2*g-r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy3
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    R=I()
    G=I()
    print(G*2-R)

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#----------
R = int(input().strip())
G = int(input().strip())
#----------

print(2*G-R)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(2* g - r)

Submission status: Accepted

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

print((2 * G) - R)

Submission status: Accepted

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

print(G*2 - R)

Submission status: Accepted

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

n = -r
while True:
    x = (r + n) / 2
    if x == g:
        print(n)
        break
    n += 1

Submission status: Accepted

Solution code:
def main():
    rating = int(input())
    goal = int(input())
    print(goal * 2 - rating)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    R=I()
    G=I()
    print(G+(G-R))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    r = int(input())
    g = int(input())
    print(2*g - r)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(g*2 - r)

Submission status: Accepted

Solution code:
def newrating(r , g):

    return (g - r) + g

def main():
    r = int(input())
    g = int(input())
    print(newrating(r , g))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
r = int(input().strip())
g = int(input().strip())

print(2 * g - r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    for x in range(-9 * 10 ** 3, 9 * 10 ** 3 + 1):
        if R + x == G * 2:
            print(x)
            return

    print(-1)


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2020/02/16
# AtCoder Beginner Contest 076 - A

# Input
r = int(input())
g = int(input())

# Calc
ans = g * 2 - r

# Output
print(ans)

Submission status: Accepted

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

print(G*2 - R)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
from itertools import product

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

r = ni()
g = ni()
print(g + (g-r))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
R = int(input())
G = int(input())
print((G - R) * 2 + R)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
r = int(input())
g = int(input())

ans = 2 * g - r
print(ans)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(2 * g - r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = int(input())
print(2*a-n)

Submission status: Accepted

Solution code:
now_r = int(input())
target = int(input())

print((target * 2) - now_r)

Submission status: Accepted

Solution code:
# 入力 : 数字2つ、別々に
R = int(input())
G = int(input())

# 出力 : RをGに上げるためにとるためのX
X = R + (G-R) * 2
print(X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
m=int(input())
print(2*m-a)

Submission status: Accepted

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

dif = g - r
ans = r + 2*dif
print(ans)

Submission status: Accepted

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

print(b*2-a)

Submission status: Accepted

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

Submission status: Accepted

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

print(g*2-r)

Submission status: Accepted

Solution code:
str = input().split()
r = int(str[0])
str = input().split()
g = int(str[0])
print((g * 2) - r)

Submission status: Accepted

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

sa = g - r

print(g + sa)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

# (r+x)/2 = g
# r+x = 2g
# x = 2g-r

print(2*g-r)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B = map(int,read().decode('utf8').split())
print(2*B-A)

Submission status: Accepted

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

Submission status: Accepted

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

print(2*g - r)

Submission status: Accepted

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

ans = 2 * (g - r)

print(r + ans)

Submission status: Accepted

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

ans = 2 * G - R

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print((g*2)-r)

Submission status: Accepted

Solution code:
x = int(input())
ave = int(input())

print(2*ave-x)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
g = int(input())
print(a+(g-a)*2)

Submission status: Accepted

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

print(g+(g-r))

Submission status: Accepted

Solution code:

a,b = (int(input()) for _ in range(2))
print(2*b-a)

Submission status: Accepted

Solution code:


import numpy as np

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
R = int(input())
G = int(input())
print(2 * G - R)

Submission status: Accepted

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

r = (G-R)*2 + R

print(r)

Submission status: Accepted

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

print(int(2 * g - r))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 入力

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

N = 2 * G - R

print(N)

Submission status: Accepted

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

print(g + (g-r))

Submission status: Accepted

Solution code:
# (a+b)/2 = c
a = int(input())
c = int(input())

print(2*c-a)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
r=int(input())
g=int(input())
print(g+g-r)

Submission status: Accepted

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

if r<g:
  print(r+2*abs(r-g))
elif r>g:
  print(r-2*abs(r-g))
else:
  print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
G = int(input())

print(2*G-a)

Submission status: Accepted

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

print(g + (g - r))

Submission status: Accepted

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

print(b*2-a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r, g=[int(input()) for i in range(2)]
ans = 2 * g - r
print(ans)

Submission status: Accepted

Solution code:
import sys

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

def main():
    return g * 2 - r

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
import math

r, g = [int(input()) for i in range(2)]
print(2 * g - r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a= int(input())
b= int(input())
c=0
if a<b:
  c=b+(b-a)
else:
  c=b-(a-b)
print(c)

Submission status: Accepted

Solution code:
R = int(input())
N = int(input())
print(N+(N-R))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(-(int(input()) - 2 * int(input())))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a=int(input())
b=int(input())

print(2*b-a)

Submission status: Accepted

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

print((g*2) - r)

Submission status: Accepted

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

t = 2*g -r

print(t)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
R = int(input())
G = int(input())

ans = 2 * G - R
print(ans)

Submission status: Accepted

Solution code:
r=input().rstrip()
g=input().rstrip()
r,g=int(r),int(g)
p=2*g-r
print(p)

Submission status: Accepted

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

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

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

Submission status: Accepted

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

print(g*2 - r)

Submission status: Accepted

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

p=g*2-r

print(p)

Submission status: Accepted

Solution code:
# ABC076a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

r = int(input())
g = int(input())
# (r+ans)/2=g
# r/2+ans/2=g
# ans/2=g-r/2
# ans=2*g-r
print(2*g-r)

Submission status: Accepted

Solution code:
##### 解けた #####

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

print(G*2-R)

Submission status: Accepted

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

next_performance = G * 2 - R

print(next_performance)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math

#入力
R = int(input())
G = int(input())

print ((G*2) - R)

Submission status: Accepted

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

Submission status: Accepted

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

X = ((2*G)-R)

print(X)

Submission status: Accepted

Solution code:
from sys import stdin
import math
import bisect
import heapq
import numpy as np
from math import factorial

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

print(g*2-r)

Submission status: Accepted

Solution code:
from sys import stdin
R = int(stdin.readline().rstrip())
G = int(stdin.readline().rstrip())
print(G*2-R)

Submission status: Accepted

Solution code:
n = int(input())
g = int(input())
print(g*2-n)

Submission status: Accepted

Solution code:
def examA():
    R = I(); G = I()
    ans = G + (G-R)
    print(ans)



import sys,copy,bisect,itertools
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

Submission status: Accepted

Solution code:
print(int(-int(input())+2*float(input())))

Submission status: Accepted

Solution code:
r = int(input())
g = int(input())
# g = (r + x) / 2 => x = 2g - r
print(2 * g - r)

Submission status: Accepted

Solution code:
a = int(input())

b = int(input())

c = (b-a) + b

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
# b = (a + x) / 2
# 2*b = a + x
# 2*b - a = x
x = 2*b - a
print(x)