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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc076/tasks/abc076_a


import itertools
import collections
import bisect

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def rating_goal(R: float, G: float)->float:
    return 2*G - R


if __name__ == "__main__":
    R = int(input())
    G = int(input())
    ans = rating_goal(R, G)
    print(ans)

Submission status: Accepted

Solution code:
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq
import itertools
import operator


inf = float('inf')


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_list_of_int():
    return [int(i) for i in input().split()]


def get_list_of_float():
    return [float(f) for f in input().split()]


def get_list_of_char():
    return list(input().strip())


def get_data(n, order=None, **kwargs):
    if not order:
        order = range(len(kwargs))
    it = iter(order)
    var, fn = zip(*sorted(sorted(kwargs.items()), key=lambda _: next(it)))

    rows = []
    for _ in range(n):
        rows.append(input().split())
    columns = zip(*rows)
    exec("global "+", ".join(var)+"\n"+"\n".join(
        v+"=list(map(fn[{}], data[{}]))".format(i, i)
        for i, v in enumerate(var)),
        globals(),
        {"fn": list(fn), "data": list(columns)}
    )
    return


# inputs
R, G = 0, 0


def set_inputs():
    global R, G
    R = get_int()
    G = get_int()
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    print((G - R) * 2 + R)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def func(r, g):
    result = 2 * g - r
    return result


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

print(func(r, g))

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    R = int(input())
    G = int(input())

    print(2*G - R)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import itertools
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return list(sys.stdin.readline())
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
mod = 1000000007

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
def A():
    r,g = IR(2)
    print(2*g-r)

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == "__main__":
    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(int(b*2-a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

b = int(input())

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

Submission status: Accepted

Solution code:
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(2*B-A)

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:
from sys import stdin
r = int(stdin.readline().rstrip())
g = int(stdin.readline().rstrip())
print(g*2-r)

Submission status: Accepted

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

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 i in range(2)]
print(r+(g-r)*2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
print(a[1] * 2 - a[0])

Submission status: Accepted

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

ans = 2 * G - R

print(ans)
print()

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:
import math
import numpy as np
import sys
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

R = I()
G = I()

print(G*2-R)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
int_r = int(input())
int_g = int(input())

p = (int_g - int_r) + int_g
print(p)

Submission status: Accepted

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

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:
""" AtCoder """

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

print(2*G - R)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数入力
r = int(input())        # 現在のレーティング 
g = int(input())        # とりたいレーティング

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

Submission status: Accepted

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

Submission status: Accepted

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

# (r + ans) / 2 = g
# r + ans = 2 * g

print(2 * g - r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
lst = []

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


ans = G - R + G
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
lst = []

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


ans = G - R + G
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


abc076_a()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def solve(a,b):
    return b+(b-a)

def readQuestion():
    a = sys.stdin.readline().strip()
    b = sys.stdin.readline().strip()
    
    return (int(a),int(b))

def main():
    a ,b  = readQuestion()
    answer = solve(a ,b)
    print(answer)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def solve(r, g):
    ans = g * 2 - r
    print(ans)

def readQuestion():
    ws = sys.stdin.readline().strip().split()
    r = int(ws[0])
    ws = sys.stdin.readline().strip().split()
    g = int(ws[0])
    return (r, g,)

def main():
    solve(*readQuestion())

main()

Submission status: Accepted

Solution code:
import sys

def solve(r, g):
    print(2*g-r)

def readQuestion():
    ws = sys.stdin.readline().strip().split()
    r = int(ws[0])
    ws = sys.stdin.readline().strip().split()
    g = int(ws[0])
    return (r, g,)

def main():
    solve(*readQuestion())

# Uncomment before submission
main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
R = int(input())
G = int(input())
print("{}".format(2 * G - R))

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math

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

print(b+(b-a))

Submission status: Accepted

Solution code:
a=int(input(''))
b=int(input(''))
c=2*b-a
print(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()); 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 = b - a
print(b + c)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

R = int(input().rstrip())
G = int(input().rstrip())

P = G * 2 - R
print(P)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

s=2*b-a

print(s)

Submission status: Accepted

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

P = 2 * G - R
print(P)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8
print(-int(input()) + 2 * int(input()))

Submission status: Accepted

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

Submission status: Accepted

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

W = G+G-R

print(W)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
r  = int( input())
g  = int( input())

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

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())
print(2*B-A)

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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

ans = 2*G - R
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(2*G-N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# cook your dish here
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 = [int(input()) for s in range(2)]
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:
#-*-coding:utf-8-*-

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

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

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


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

if __name__ == "__main__":
        main()

Submission status: Accepted

Solution code:
#coding:utf-8
n=[]
for i in range(2):
  n.append(int(input()))
n1=n[1]*2-n[0]
print(n1)

Submission status: Accepted

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

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


print(2*G-R)

Submission status: Accepted

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

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 i in range(2)]
print(2*g-r)

Submission status: Accepted

Solution code:
r=int(input())
g=int(input())
print(g+abs(r-g) if r<g else g-abs(r-g))

Submission status: Accepted

Solution code:
R=int(input().strip())
G=int(input().strip())
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:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 2 * G - R

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ６月５日
a = int(input())
b = int(input())
c = b*2-a
print(c)

Submission status: Accepted

Solution code:
a = []
for i in range(2):
    a.append(input()) 
R=int(a[0])
G=int(a[1])
print(2*G-R)

Submission status: Accepted

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

Submission status: Accepted

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

print('{}'.format((2*g-a)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

r = ni()
g = ni()

print(g*2-r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r=float(raw_input())
g=float(raw_input())

if int(g*2-r)==float(g*2-r):
	print int(g*2-r)
else:
	print g*2-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( g*2-r )
#why the fuck the code should be longer than 50 characters

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(2 * g - r)

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

r = int(arr_data[0][0])
g = int(arr_data[1][0])


print(g*2-r)

Submission status: Accepted

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

Submission status: Accepted

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

print(2*N-R)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#-*- coding: utf-8 -*-
print(-int(input())+2*int(input()))

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem A

if __name__ == '__main__':
    current_rating = int(input())
    target_rating = int(input())

    result = 2 * target_rating - current_rating
    print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)

# Debug output
def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

# Binary converter
def to_bin(x):
    return bin(x)[2:]

# Set 2 dimension list
def dim2input(N):
    li = []
    for _ in range(N):
        li.append(input().split())
    return li

# --------------------------------------------

dp = None

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

    print(R+diff*2)

main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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:
r,g=(float(input()) for i in range(2))
print(int(2*g-r))

Submission status: Accepted

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

r = 2 * G - R
print(r)

Submission status: Accepted

Solution code:
# coding: utf-8

#整数の入力
a = int(input())
b = int(input())
#スペース区切りの整数の入力
#a, b, c = map(int, input().split())
#文字列の入力
#s = 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:
a=int(input())
c=int(input())
print(2*c-a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# r + ? / 2 = g

ans = int(2*g - r)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

# output
print(g * 2 - r)

Submission status: Accepted

Solution code:
import math

r = input()
g = input()

b = float(g)*2.0-float(r)
print(math.ceil(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(g+g-r)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def rating_goal(R,G):
	print(G * 2 - R)

R = int(input())
G = int(input())
rating_goal(R,G)

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    print(2 * G - R)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")
 
 
def main():
    R = int(input())
    G = int(input())
 
    print(G + (G - R))
 
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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