~/algor $ cat contests/round-7/N
N. Sum of a progression
Problem N
ICPC rules
1000 ms
64 MB
The first term of an arithmetic progression, its common difference and the number of terms are given. The terms are: Find the sum of the first terms.
Input
One line with three integers: , and .
Output
One integer — .
Note
Examples
Input #1
1 1 5
Output #1
15
Input #2
10 -3 4
Output #2
22