#abc259a. [abc259_a]Growth Record
[abc259_a]Growth Record
Problem Statement
Takahashi had his -th birthday, when he was centimeters tall.
Additionally, we know the following facts:
- In each year between Takahashi's birth (-th birthday) and his -th birthday, his height increased by centimeters. More formally, for each , his height increased by centimeters between his -th birthday and his -th birthday.
- Between Takahashi's -th birthday and his -th birthday, his height did not change.
Find Takahashi's height on his -th birthday, in centimeters.
Constraints
- Takahashi was at least centimeter tall at his birth.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
38 20 17 168 3
Sample Output 1
168
In this sample, Takahashi was centimeters tall on his -th birthday. Also, his height did not change between his -th birthday and -th birthday.
From these facts, we find that he was centimeters tall on his -th birthday, so the answer is .
Sample Input 2
1 0 1 3 2
Sample Output 2
1
In this sample, Takahashi was centimeter tall on his -th birthday and centimeters tall on his -st birthday.
Sample Input 3
100 10 100 180 1
Sample Output 3
90