Arithmetic progressions#9895

Arithmetic progressions

1 second
128 megabytes
Very easy

Let a_n, b_n, c_n be arithmetic progressions. It is known that

For the given positive integer find the value of a_k + b_k + c_k.

Input

Three integers p, q~(|p|, |q| \le 10^{18}), k~(k > 0).

Output

Print the value of a_k + b_k + c_k. It is known that output is no more than 10^{18} by absolute value.

Examples

Example 1

Loading
Loading