Hide

Problem A
Blaster's Dash

/problems/mines22.blastersdash/file/statement/en/img-0001.jpg
Photo from Blue Key Honor Society. Retrieved from Facebook.

After every touchdown that Mines scores at a football game, the Mines mascot Blaster the Burrow runs out on the field to the $n^{\text {th}}$ yard line, and back, escorted by members of the Blue Key honor society who also carry the Mines flag. Because Mines scores so many touchdowns, Blaster gets tired and runs at most to the $50^{\text {th}}$ yard line (midfield).

To run to the $n^{\text {th}}$ yard line, Blaster runs $10$ yards from the fence to the back of the endzone, then runs $10$ yards through the endzone, and finally runs $n$ yards to reach the $n^{\text {th}}$ yard line. To complete his trip on the field, Blaster then runs straight back to the fence. Given that Blaster ran to the $n^{\text {th}}$ yard line after one particular touchdown scored by Mines, how far did he run in total?

Input

The first line of input contains two space-separated integers representing the score of the game. The score for the Colorado School of Mines football team, $M$, is first, followed by the score for their opponent, $V$. You are guaranteed that the score for Mines is greater than the score for their opponent ($M > V$).

The next line of input contains a single integer, $1 \leq n \leq 50$, representing the yard line that Blaster ran to.

The last line of input contains a single integer representing, $K$, the current temperature in Kelvin.

Output

Output a single line containing the total number of yards that Blaster ran after this particular touchdown.

Sample Input 1 Sample Output 1
55 6
42
294
124

Please log in to submit a solution to this problem

Log in