eolymp
bolt
Try our new interface for solving problems
Problems

Arithmetic mean

Arithmetic mean

Petya has two numbers a and b (ab). He found the arithmetic mean of these numbers (let it be the number c), that also turned out to be an integer. That is, c = (a + b) / 2.

You are given the number a (that is, the smallest of two numbers), and you are also given the number c. Find b.

Input data

The first line contains one integer a (1a100).

The second line contains a single integer c (ac100).

Output

Print one integer b.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3
7
Output example #1
11
Author Anton Tsypko
Source 2023 UOI. Stage II