CF534B Covered Path

Description

The on-board computer on Polycarp's car measured that the car speed at the beginning of some section of the path equals $ v_{1} $ meters per second, and in the end it is $ v_{2} $ meters per second. We know that this section of the route took exactly $ t $ seconds to pass. Assuming that at each of the seconds the speed is constant, and between seconds the speed can change at most by $ d $ meters per second in absolute value (i.e., the difference in the speed of any two adjacent seconds does not exceed $ d $ in absolute value), find the maximum possible length of the path section in meters.

Input Format

The first line contains two integers $ v_{1} $ and $ v_{2} $ ( $ 1

Output Format

Print the maximum possible length of the path segment in meters.

Explanation/Hint

In the first sample the sequence of speeds of Polycarpus' car can look as follows: 5, 7, 8, 6. Thus, the total path is $ 5+7+8+6=26 $ meters. In the second sample, as $ d=0 $ , the car covers the whole segment at constant speed $ v=10 $ . In $ t=10 $ seconds it covers the distance of 100 meters.