Home => ProblemSet => 1.3-18:等差数列末项计算
Problem1037--1.3-18:等差数列末项计算

1037: 1.3-18:等差数列末项计算

Time Limit: 1 Sec  Memory Limit: 128 MB  Submit: 4  Solved: 12
[ Submit ] [ Status ] [ Creator: ][ 参考程序 ]

Description

给出一个等差数列的前两项a1,a2,求第n项是多少。

Input

一行,包含三个整数a1,a2,n。-100 <= a1,a2 <= 100,0 < n <= 1000。

Output

一个整数,即第n项的值。

Sample Input Copy

1 4 100

Sample Output Copy

298