Problem1035--等差数列末项计算

1035: 等差数列末项计算

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 5  Solved: 5
[Submit] [Status] [Web Board] [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

Source/Category