## Problem J1: Next in line

You know a family with three children. Their ages form an arithmetic sequence: the difference in ages between the middle child and youngest child is the same as the difference in ages between the oldest child and the middle child. For example, their ages could be 5, 10 and 15, since both adjacent pairs have a difference of 5 years.

Given the ages of the youngest and middle children, what is the age of the oldest child?

### Input

The input consists of two integers, each on a separate line. The first line is the age Y of the youngest child (0 ≤ Y ≤ 50). The second line is the age M of the middle child (Y ≤ M ≤ 50).

### Output

The output will be the age of the oldest child.

```12
15```

`18`

```10
10```

### Sample Output 2

`10`

Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

• (0/0)
is it neccesary to include that they must be less than 50 years old, or can that fact be ignored?

• (1/0)
Input ranges should not be ignored, per se, but for easier problems, you don't usually need to pay too much attention.

(Of course, if you WA, you should certainly check to see if you made an incorrect assumption about the input!)

• (0/0)
Is this really a question for the Canadian Computing Competition? It's far too easy compared to IOI problems.

• (1/0)
this is a junior 1 problem