#P56. 练11.3 等差数列末项计算

练11.3 等差数列末项计算

Description

Given the first two terms a1a_1 and a2a_2 of an arithmetic sequence, determine the nnth term.

Input Format

Input consists of a single line with three integers a1a_1, a2a_2, and nn. The constraints are 100a1,a2100-100 \le a_1, a_2 \le 100 and 0<n10000 < n \le 1000.

Output Format

Output a single integer representing the value of the nnth term.

Sample

1 4 100
298