Skip to main content

~/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.

n terms of an arithmetic progression drawn as columns: the first is a, each next is d larger than the previous

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

Sign in to submit a solution

Signing up is free and takes a minute.