St Andrews Online Judge

MABP

By Kay Akashi

Time: 1000 ms
Memory: 256000 kB

The code judging system is only available during contests. Check out the github repo for test cases and solutions.

Please log in.

Problem Statement

Mean arterial blood pressure (MABP) can provide you with the notional average of blood pressure of an individual during each cardiac cycle. In order to calculate this value, you're usually given diastolic pressure (lowest aortic pressure when the heart is at rest) and systolic pressure (highest aortic pressure when the heart is contracting). Then, you calculate what is referred to as pulse pressure which you can calculate by subtracting diastolic pressure from systolic pressure. With those values, MABP can be calculated in a following way:

MABP = (diastolic pressure) + 13\frac{1}{3} × (pulse pressure)

Today, Kay and his friend Haniyah are coming to the clinical placement supervised by the GP practitioner. The doctor was asking Kay to record one patient's diastolic pressure, systolic pressure, and MABP. However, Haniyah noticed that Kay wasn't writing down the patient's systolic pressure, while diastolic pressure and calculated MABP were accurately recorded. Being so kind, she added the patient's systolic pressure by calculating based on the provided values of systolic pressure and MABP to the record before submission so that Kay won't be scolded by the doctor. What was the value Haniyah added to the record?

Unit of MABP, systolic pressure, and diastolic pressure is mmHgmmHg.

Constraints

6565 \leq MABP, systolic pressure 140\leq 140. It is ensured that the resulting systolic pressure is higher than or equal to diastolic pressure, and is between 6565 and 140mmHg140mmHg. All the input values are integers.

Input

The input consists of 22 integers, MM and DD, indicating MABP and diastolic pressure.

Output

Output the systolic pressure in a single line. Round an answer to the nearest integer.

Examples

Input

107 98

Output

125

Explanation

When the systolic pressure is 125mmHg125mmHg and diastolic pressure is 98mmHg98mmHg, the pulse pressure is 12598=27mmHg125 - 98 = 27mmHg. Thus, the MABP is 98+13×27=107mmHg98 + \frac{1}{3} × 27 = 107mmHg that agrees with the MABP given in input.

Input

138 138

Output

138

Explanation

In healthy individuals systolic and diastolic pressures wouldn't be equal, but note that this kind of testcases might be present.