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


def main():

    # Get Args
    args = _input_args()  # get arguments as an array from console/script parameters.

    # Call main Logic
    result = _main(args)

    # Export a result in a correct way.
    _export_result(result)


def _main(args):
    """Write Main Logic here for the contest.

    :param args: arguments
    :type args: list
    :return: result
    :rtype: depends on your logic.
    """
    # Extract arguments.
    R = int(args[0])
    G = int(args[1])

    # Write main logic here.
    X = (2 * G) - R

    # Return something.
    return X


def _input_args():
    # Comment-out appropriate pattern depends on subject.

    # arguments = sys.argv[1:]  # ptn1: get args from script parameters.
    # arguments = _input().split()  # ptn2: get args from 1 line console prompt with space separated.

    # for multi-line console input, use this.
    arguments = _get_args_from_multiple_lines(end_of_lines_char=[''])

    # Cast elements If you need.
    # arguments = list(map(int, arguments))  # cast elements to int for example.

    return arguments  # This will be array.


def _input():
    # If Subject requires interactive input, use this and patch mock in unittest.
    return input()  # Change if necessary.


def _get_args_from_multiple_lines(end_of_lines_char=['']):
    """Get arguments from multiple lines standard input.

    :param end_of_lines_char: Strings that indicate the end of lines.
    :type end_of_lines_char: list of str
    :return: args
    :rtype list of str
    """
    args = []
    while True:
        try:
            arg = _input()
            if arg in end_of_lines_char:
                break
            args.append(arg)
        except EOFError:  # Supports EOF Style. (Very Rare case)
            break
    return args


def _export_result(result):
    # Comment-out appropriate output pattern depends on subject.

    # sys.stdout.write(result)  # No Line Feed, and an result must be string (not useful). for single value output.
    # print(result)  # The result will cast to strings. Line feed will be appended to the end. for single value output.
    # print(result, end='')  # Same as above except Line Feed won't be appended. for single value output.
    # print(','.join(map(str, result)))  # Print array elements as comma separated strings. for multi-value.
    print('{}'.format(str(result)))  # Same as above, but more versatile.


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
now_rate = int(input())
goal_rate = int(input())

perform = goal_rate * 2 - now_rate

print(perform)

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

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

Submission status: Accepted

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

Submission status: Accepted

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

x = 2*G -R
print(x)

Submission status: Accepted

Solution code:
# coding: utf-8

if __name__ == "__main__":
    R = int(input())
    G = int(input())
    parformans = 0.0

    parformans = 2 * G - R
    print(parformans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

diff = G - R
print(diff+ G)

Submission status: Accepted

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

def f(R, G):
    return 2*G-R

def test():
    assert f(2002, 2017) == 2032
    assert f(4500, 0) == -4500

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

    print(f(R,G))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

now_rate = int(input())
goal_rate = int(input())

ans = 2*goal_rate-now_rate
print(ans)

Submission status: Accepted

Solution code:
# Rating Goal

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

print( (2*g-r)//1 )

Submission status: Accepted

Solution code:
pres_rate = int(input())
goal_rate = int(input())
next_rate = goal_rate * 2 - pres_rate
print(next_rate)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
b = int(input())
# 出力
print (2*b-a)

Submission status: Accepted

Solution code:
p1 = input();
p2 = input();
print(int(p2) +(int(p2) - int(p1)));

Submission status: Accepted

Solution code:
#ABC076A

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

Submission status: Accepted

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

b=b*2
c = b-a
print(c)

Submission status: Accepted

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

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

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:
rating1=int(input())
expectation=int(input())
rating2=2*expectation-rating1
print(rating2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
#!/usr/bin/python

# AtCoder Beginner Contest 076
# A - Rating Goal

from sys import stdin

def solve(R, G):
  # (R + x) / 2 = G
  return 2 * G - R

R = int(stdin.readline())
G = int(stdin.readline())
print(solve(R, G))

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
R = 0
G = 0

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

solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
R=int(raw_input())
G=int(raw_input())
x=0
if 0<=R<=4500 and 0<=G<=4500:
    x+=2*G-R
    print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

print((G-R)+G)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

cur = sys.stdin.readline()
target = sys.stdin.readline()

a = int(target) * 2 - int(cur)

print (a)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    r = int(input())
    g = int(input())
    diff=g-r
    print(g+diff)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
r = int(input())
g = int(input())
print (2 * g - r)

Submission status: Accepted

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

A =G * 2 - R

print(A)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a =  float(raw_input())
c = float(raw_input())
print int(2*c-a)

Submission status: Accepted

Solution code:
r = int(raw_input())
g = int(raw_input())
if(r > g):
  print(g - (r-g))
if(g > r):
    print (g + (g - r))
if(g == r):
    print(r)

Submission status: Accepted

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

print(x)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
# coding: utf-8
N1 = int(input())
N2 = int(input())


N3 = (N2 *2)-N1

print(N3)

Submission status: Accepted

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

N=2*G-R

print('{0}'.format(N))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
if __name__ == '__main__':
    R = input()
    G = input()
    print int(float(G) * 2 - float(R))

Submission status: Accepted

Solution code:
n = int(input())
hoge = int(input())

print(hoge - n + hoge)

Submission status: Accepted

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

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

Ans = G * 2 - R

print(Ans)

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

print(ans)

Submission status: Accepted

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

A = 2 * G - R
print(A)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://abc076.contest.atcoder.jp/tasks/abc076_a

"""
import sys
from sys import stdin
input = stdin.readline


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


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    line = sys.stdin.readline()
    while line:
        R = int(line)
        G = int(sys.stdin.readline())
        print(2*G - R)

        line = sys.stdin.readline()

if __name__ == "__main__":
    main(sys.argv)

Submission status: Accepted

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

print 2*G-R

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

r = int(sys.stdin.readline().strip())
g = int(sys.stdin.readline().strip())

print(2*g - r)

Submission status: Accepted

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

"""076-a"""


import sys


def main():
    """Main function."""
    R = int(input())
    G = int(input())

    print(2 * G - R)


if __name__ == '__main__':
    sys.exit(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=R+(G-R)*2

print(ans)

Submission status: Accepted

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

result = G * 2 - R
print(result)

Submission status: Accepted

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

Submission status: Accepted

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


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

    x = 2 * G - R
    print(x)

main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys, re, copy, math, itertools
from copy import *
from collections import deque, defaultdict
from heapq import *
from bisect import *
#import numpy as np
#import scipy as sp

# 読み込み
R = int( input() )
G = int( input() )

print(2*G-R)

Submission status: Accepted

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

b = 2*G - R
print(b)

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
## -*- coding:utf-8
#import os
#import sys
#import re
#import deque

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

#G=(R+X)/2
#2G=(R+X)
#2G-R=X

print((2*G)-R,flush=True)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print G * 2 - R

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# encoding: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())
D = int(input())

print(D + (D-R))

Submission status: Accepted

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

Result = B*2-A
print(Result)

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from collections import defaultdict
def readLine_int_list():return list(map(int, stdin.readline().split()))
def readLine_int_list_reverse(): return list(map(int, stdin.readline().split())).reverse()
def readAll_int(): return list(map(int, stdin))
def readLine_str_list():return list(map(str, stdin.readline().split()))
def readAll_str(): return list(map(str, stdin))


def main():
	a,b = readAll_int()
	print((2*b)-a)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#http://abc076.contest.atcoder.jp/
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A:

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

print(2*G-R)

Submission status: Accepted

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

import numpy as np
a = int(input())
b = int(input())

print(2*b - a)

Submission status: Accepted

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

print 2*G - R

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,collections
sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

R = I()
G = I()

print(2*G-R)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from collections import Counter

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

print(2*G-R)

Submission status: Accepted

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

from collections import defaultdict
from math import factorial as f
from fractions import gcd as g

a = int (raw_input ())
b = int (raw_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:
num = int(input())
num2 = int(input())
print(num2+(num2-num))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


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

    return r+(g-r)*2


print(main())

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
def get_ln_inputs():
    return input().split()


def map_list(fn, xs):
    return list(map(fn, xs))


def get_ln_int_inputs():
    return map_list(int, get_ln_inputs())


def main():
    R = get_ln_int_inputs()[0]
    G = get_ln_int_inputs()[0]
    print(R + 2* (G - R))
    return


main()

Submission status: Runtime Error

Solution code:
print(chr(ord(input())+1))

Submission status: Runtime Error

Solution code:
s = input()
print(chr(ord(s)+1))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int R;
  int G;
  
  cin >> R;
  cin >> G;
  cout << G*2-R << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
R, G = map(int, input().split())

print(2 * G - R)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
https://atcoder.jp/contests/abc076/submissions/16272116

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
R, G = (int(x) for x in input().split())
ans = 2*G - R
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
c=input()
t=input()
lic=list(c)
lit=list(t)
ans=[]
lia=[]
n=len(c)-len(t)
End=False
for i in range(n+1):
    hantei=True
    s='?'*i+t+'?'*(n-i)
    lis=list(s)
    for j in range(len(c)): 
        p=lic[j]
        q=lis[j]
        a=(p==q)
        if a==False and (p!='?' and q!='?'):
            hantei = False
            break
    if hantei == True:
        End = True
        ans=lis
        
    if End==True:
        for i in range(len(c)):
            if lic[i]=='?':
                lic[i]=ans[i]
        for i in range(len(c)):
            if lic[i]=='?':
                lic[i]='a'
        
        lia.append(''.join(lic))
sorted(lia)
print(lia[0])
if len(lia)==0:
    print("UNRESTORABLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a , av =  map(int, raw_input().split())
print 2*av - a

Submission status: Runtime Error

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

print(g*2-r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))
### setting
sys.setrecursionlimit(10 ** 6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------

R, G = iInM()
ans = 2 * G - R
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sa = G-B
print(G+sa)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


print(2G-R)

Submission status: Runtime Error

Solution code:
N = int(input())
items = [input() for _ in range(N)]

print(len(set(items)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

N = int(input())
T = [0] + list(map(int, input().split()))
V = [0] + list(map(int, input().split()))

max_speed_from_left = [0] * (N + 1)
max_speed_from_right = [0] * (N + 1)

for i in range(1, N):
    start = max_speed_from_left[i - 1]
    max_speed_from_left[i] = min(start + T[i], V[i], V[i + 1])

for i in range(N - 1, 0, -1):
    start = max_speed_from_right[i + 1]
    max_speed_from_right[i] = min(start + T[i + 1], V[i], V[i + 1])

speed = [min(x, y) for x, y in zip(max_speed_from_left, max_speed_from_right)]

def dist(left_speed, right_speed, t, v):
    x = (v - left_speed) + (v - right_speed)
    if x >= t:
        v = (left_speed + right_speed) / 2
        x = t
    d = (left_speed + v) * (v - left_speed) / 2
    d += v * (t - x)
    d += (right_speed + v) * (v - right_speed) / 2
    return d

ans = 0
for i in range(1, N + 1):
    ans += dist(speed[i - 1], speed[i], T[i], V[i])

print (ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
0 <= R <= 4500
0 <= G <= 4500
G = (R + A) / 2  
print(A)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(2*g-r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())
print(2*y-x)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
R,G=map(int,input().split())
ans=G*2-R
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input R, G
output (2 * G – R)

Submission status: Runtime Error

Solution code:
G,R= map(int, input().split())
print(str(2G-R))

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
c=a+b
print(str(c/2))

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
print((a+b)/2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
R=input("入力")
G=input("入力")
print(2*G-R);

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
s = input().rstrip("\n")
t = input().rstrip("\n")
flg = False
#cnt = 0

if len(s)-len(t)+1<0:
   print("UNRESTOABLE")
    sys.exit(0)
 
for i in range(len(s)-len(t)+1):
    cnt = 0
    for j in range(len(t)):
        #print(s[i+j],t[j])
        if s[i+j] == t[j] or s[i+j] == '?':
            cnt+=1
        #print(cnt,len(t))
    if cnt == len(t):
        cnt=i
        flg = True
        #print(cnt)
        break
 
if not flg:
    print("UNRESTORABLE")
else:
    li = list(s.replace("?","a"))
    #print(li)
    for j in range(len(t)):
        #print(li[cnt+j], t[j])
        li[cnt+j] = t[j]
    print("".join(li))