# https://www.acmicpc.net/problem/3046 # boj, 3046: R2, python3 import sys input = sys.stdin.readline def solve(r1, s): return 2*s - r1 if __name__ == '__main__': r1, s = map(int, input().split()) print(solve(r1, s))
boj 3046 github