Cấp số tiếp theo

View as PDF



Problem type
Points: 0 Time limit: 1.0s Memory limit: 128M Input: stdin Output: stdout

Cho \(3\) số \(a, b, c\). Ba số đó tạo thành một cấp số cộng hoặc nhân. Hãy tìm số tiếp theo của dãy số đó.

Input

  • Nhập vào ba số \(a, b, c\) (\(-10^{5} \le a, b, c \le 10^{5}\)).

Output

  • In ra đáp án.

Example

Test 1
Input
2 4 6
Output
8
Test 2
Input
2 4 8
Output
16

Comments

There are no comments at the moment.