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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Rating Goal
R = int(input())
G = int(input())
T = R + 2 * (G - R)
print(T)

Submission status: Accepted

Solution code:
import sys

r, g = (int(x) for x in sys.stdin.read().split())
ans = g * 2 - r
print(ans)

Submission status: Accepted

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

print(g + (g - r))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(g * 2 - r)

Submission status: Accepted

Solution code:
#asfddddddd
n = int(input())
m = int(input())
print(m + m - n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = int(input())
g = int(input())
if r >= g:
  print(g- (r-g))
else:
  print(g+ (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 = int(input())
G = int(input())

# (R+x)/2 = G
# R + x = 2G
#x = 2G-R
print(2*G-R)

Submission status: Accepted

Solution code:
import sys
from itertools import accumulate
input = sys.stdin.readline
def inputs():return [int(x) for x in input().split()]
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:
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:
#76a
R = int(input()) #now rating
G = int(input()) #target rating

#現在のレーティングを aとする。
#次のコンテストで, パフォーマンス bを取ったとする。
#そのとき, レーティングは aと b の平均まで変化する。 
#after rating = (a+b)/2
#→G = (R+b)/2
# →2*G = R+b
#  →b = 2*G -R
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, b = [int(input()) for _ in range(2)]
print(2*b-a)

Submission status: Accepted

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

print(G*2 - R)

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(2)]
R=a[0]
G=a[1]
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())

X = G*2 - R
print(X)

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    r=INT()
    g=INT()
    print(2*g-r)
if __name__ == '__main__':
    do()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#2019/10/03
data = list(map(int, open(0).read().split()))
print(data[1] * 2 - data[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    r = int(input().rstrip('\n'))
    g = int(input().rstrip('\n'))
    print(2 * g - r)


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(2*G-R)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

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

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

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


R =  int(sys.stdin.readline())
G =  int(sys.stdin.readline())

print(math.floor((2 * G) - R))

Submission status: Accepted

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

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

X = G - R
ans = G + X
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
r=int(input())
g=int(input())

print(g+g-r)

Submission status: Accepted

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

# (ans + R) / 2  = G
# ans + R = 2 * G
# ans = 2 * G - R

print(2 * G - R)

Submission status: Accepted

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

res = 2*G-R
print(res)

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
r = int(input())
g = int(input())
if 0 <= r <= 4500 and 0 <= g <= 4500:
    print(2 * g - r)
else:
    print('hoge!')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import  math
import bisect
from statistics import *
from collections import *
from operator import itemgetter
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

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

Submission status: Accepted

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

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

m = g * 2 - r

print(m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r,g=open(0);print(2*int(g)-int(r))

Submission status: Accepted

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

Submission status: Accepted

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

print(g-a+g)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
curr_rating = int(input())
final_rating = int(input())

print(2 * final_rating - curr_rating)

Submission status: Accepted

Solution code:
def main():
    R = int(input())
    G = int(input())
    return 2*G - R
if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

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

print(G * 2 - R)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    test()

Submission status: Accepted

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

Submission status: Accepted

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

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())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:
n,m=(int(input()) for _ in range(2))
print(n+((m-n)*2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# x,y=map(int,input().split())
r=int(input())
g=int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#76

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

print(2*G-R)

Submission status: Accepted

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

Submission status: Accepted

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

x = 2*G-R
print (x)

Submission status: Accepted

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

print((2*g) -r)

Submission status: Accepted

Solution code:
now = int(input())
goal = int(input())

print(goal*2-now)

Submission status: Accepted

Solution code:
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:
# -*- coding: utf-8 -*-

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

# solve & output
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())
ans = 2 * G - R

print(ans)

Submission status: Accepted

Solution code:
B = int(input())
T = int(input())

print(B+(T - B)*2)

Submission status: Accepted

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

ans=2*G-R
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    R = inputInt()
    G = inputInt()
    
    print((2*G)-R)
    
            	
if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(str(2*G-R))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


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))  # type: int
    G = int(next(tokens))  # type: int
    solve(R, G)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc076/tasks/abc076_a
# A - Rating Goal

r = int(input().split()[0])
g = int(input().split()[0])

next = g * 2 - r
print(next)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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 S_LIST(): return list(input())

# def LIST(): return list(map(str, input().split()))
# def LIST(): return list(input())

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

R = INT()
G = INT()
add = G - R
print(G + add)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r,g=map(int,open(0))
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())

tmp = 2 * G
ans = tmp - R
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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 + (b-a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#ABC76 A

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

print(g + (g-r))

Submission status: Accepted

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

print(G + (G - R))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

# print(R)
# print(G)

print((2 * G) - R)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# run on python 3.4.3

from sys import stdin


def main():
    r = int(stdin.readline())
    g = int(stdin.readline())
    ans = g * 2 - r
    print(ans)


main()

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:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

R = n()
G = n()

print(2* G - R)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(R: int, G: int):
    # (R + X) / 2 = G
    print(2*G - 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))  # type: int
    G = int(next(tokens))  # type: int
    solve(R, G)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
r, g = int(input()), 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:
def main():
    print(-1 * int(input()) + int(input()) * 2)


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def main():
    n = int(input())
    k = int(input())

    print(2 * k - n)



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

abc()

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 2*g-r
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print R+(G-R)*2

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(g*2-r)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(R: int, G: int):
    return 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
    result = solve(R, G)
    if isinstance(result, Iterable):
        result = '\n'.join([str(v) for v in result])
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    R = int(input())
    G = int(input())
    
    print(2*G - R)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# /usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math


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

print(g+(g-r))

Submission status: Accepted

Solution code:

def read_input():
    r = int(input())
    g = int(input())
    return r, g


def submit():
    r, g = read_input()

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



if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    r = f()[0]
    g = f()[0]

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

solve()

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(int(2*b-a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
# -*- coding: utf-8 -*-

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

print(2*g - r)

Submission status: Accepted

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

print(b + b - a)

Submission status: Accepted

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

print(2*G -R)

Submission status: Accepted

Solution code:
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


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


def inlf():
    return list(map(float, input().split()))


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


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


r, g = inpm(2)
print(r + (g - r) * 2)

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:
# ABC076A - Rating Goal
r, g= list(map(int, [input().rstrip() for _ in range(2)]))
print(g * 2 - r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(int((b - (a / 2)) * 2))

Submission status: Accepted

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

Submission status: Accepted

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

print(2*G- R)

Submission status: Accepted

Solution code:
R, G = map(int, open(0).read().split())
print(G + (G - R))

Submission status: Accepted

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

Submission status: Accepted

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

print(target * 2 - current_rate)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(string):
    r, g = map(int, string.split())
    return str(2 * g - r)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))