R2
시간 제한: 1000ms메모리 제한: 128MB출처: COCI 2006-2007BOJ 3046
문제
The number S is called the mean of two numbers R1 and R2 if S is equal to (R1+R2)/2. Mirko's birthday present for Slavko was two integers R1 and R2. Slavko promptly calculated their mean which also happened to be an integer but then lost R2! Help Slavko restore R2.
입력
The first and only line of input contains two integers R1 and S, both between -1000 and 1000.
출력
Output R2 on a single line.
예제
예제 1
입력
11 15
출력
19
예제 2
입력
4 3
출력
2
코드를 제출하려면 로그인하세요.