시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 4937 4159 3851 85.483%

문제

두 숫자 R1과 R2가 있을 때, 두 수의 평균 S는 (R1+R2)/2와 같다. 상근이는 정인이 생일 선물로 두 숫자 R1과 R2를 주려고 한다. 생일 파티에서 상근이는 정인이에게 이 두 숫자를 말해주고, 정인이는 이 숫자를 받아 적는다. 그리고 나서 기쁜 마음으로 1년동안 이 숫자를 외우면서 산다.

상근이는 R1과 R2를 엄청난 고민 끝에 정했다. 작년에는 R1과 R2를 까먹어서 아무 숫자나 정해서 주었기 때문에, 올해는 까먹지 않기 위해서 평균 S도 같이 기억하려고 한다.

오늘은 정인이 생일이다. 5분 후에 상근이는 생일 선물로 두 숫자 R1과 R2를 말해주어야 하지만, 안타깝게도 R2를 까먹고 말았다. 하지만 R1과 S는 기억하고 있다!

상근이를 도와 R2가 몇 인지 구하는 프로그램을 작성하시오.

입력

첫째 줄에 두 정수 R1과 S가 주어진다. 두 수는 -1000보다 크거나 같고, 1000보다 작거나 같다.

출력

첫째 줄에 R2를 출력한다.

예제 입력 1

11 15

예제 출력 1

19
W3sicHJvYmxlbV9pZCI6IjMwNDYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJSMiIsImRlc2NyaXB0aW9uIjoiXHJcbjxwPlxyXG5cdFx1YjQ1MCBcdWMyMmJcdWM3OTAgUjFcdWFjZmMgUjJcdWFjMDAgXHVjNzg4XHVjNzQ0IFx1YjU0YywgXHViNDUwIFx1YzIxOFx1Yzc1OCBcdWQzYzlcdWFkZTAgU1x1YjI5NCAoUjErUjIpXC8yXHVjNjQwIFx1YWMxOVx1YjJlNC4gXHVjMGMxXHVhZGZjXHVjNzc0XHViMjk0IFx1YzgxNVx1Yzc3OFx1Yzc3NCBcdWMwZGRcdWM3N2MgXHVjMTIwXHViYjNjXHViODVjIFx1YjQ1MCBcdWMyMmJcdWM3OTAgUjFcdWFjZmMgUjJcdWI5N2MgXHVjOGZjXHViODI0XH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