#PCBBAY0000013. Nội suy tuyến tính (Linear Interpolation)

Nội suy tuyến tính (Linear Interpolation)

Linear Interpolation

Version: Phuoc Hung OJ Extended

Problem Statement

Given endpoints aa, bb and a parameter t∈[0,1]t\in[0,1], compute their linear interpolation y=a+(b−a)ty=a+(b-a)t. The value equals aa at t=0t=0 and bb at t=1t=1. Print yy with exactly 6 digits after the decimal point.

Input

The only line contains real endpoints aa, bb followed by parameter tt.

Output

Print interpolated value yy with exactly 6 decimal places.

Subtasks

  • Subtask 1 (100 points): a,b,ta,b,t are finite; 0≤t≤10\le t\le1.

Examples

Example 1

Input

0 10 0.25

Output

2.500000

Explanation. The endpoint difference is 10. Evaluating 0 + (10 - 0) × 0.25 = 2.5 and formatting gives 2.500000.

Example 2

Input

5 9 0.5

Output

7.000000

Explanation. The endpoint difference is 4. Evaluating 5 + (9 - 5) × 0.5 = 7 and formatting gives 7.000000.

Example 3

Input

-10 10 0.75

Output

5.000000

Explanation. The endpoint difference is 20. Evaluating -10 + (10 - -10) × 0.75 = 5 and formatting gives 5.000000.