1166: 等差数列

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:40 Solved:31

Description

给出等差数列的前两项a1,a2,计算第n项是多少

Input

等差数列前两项和n

Output

第n项

Sample Input Copy

2 4 3

Sample Output Copy

6

HINT

an=a1+(n−1)d

d=a2-a1