The Taoist (Chinese Shaman) Bai Yuechu has been trapped by the Yichidao league for the entirety of his life. Now, they are forcing him to marry an underage girl! However, he has a plan to escape and win his freedom forever.
Bai Yuechu plans to get married to a stranger within the next seconds, through the power of extreme - speed - dating. He is very attractive and has an initial attractiveness of . He has arranged for a date with a new stranger at each second. However, instead of going on the -th date, he can instead increase his attractiveness by . It is a well known fact that Bai Yuechu's success on a date is based on his attractiveness during that second and that his total success among all the dates is equal to the sum of the individual successes on the dates he goes to. He would like you to help him calculate the maximum total success that he can achieve, if he increases his attractiveness at the right times.
Input Specification
Line 1: 3 integers, , , and
Sample Input
10 3 1
Sample Output
80
Explanation
Bai Yuechu increases his attractiveness by 3 in each of the first 5 seconds and goes on dates for the last 5 seconds.
This gives him a total success value of .
Comments