Contest Duration: - (local time) (130 minutes) Back to Home
A - Fairness /

Time Limit: 2 sec / Memory Limit: 1024 MB

### 問題文

• 3 人は同時に、他の 2 人の持っている整数の和を求める。その後、自分の持っている整数を求めた整数で置き換える。

ただし、答えの絶対値が 10^{18} を超える場合は、代わりに Unfair と出力してください。

### 制約

• 1 \leq A,B,C \leq 10^9
• 0 \leq K \leq 10^{18}
• 入力はすべて整数である

### 入力

A B C K


### 入力例 1

1 2 3 1


### 出力例 1

1


1 回の操作後、高橋君、中橋君、低橋君の持っている整数はそれぞれ (5,4,3) となります。5-4=1 を出力します。

### 入力例 2

2 3 2 0


### 出力例 2

-1


### 入力例 3

1000000000 1000000000 1000000000 1000000000000000000


### 出力例 3

0


Score : 300 points

### Problem Statement

Takahashi, Nakahashi and Hikuhashi have integers A, B and C, respectively. After repeating the following operation K times, find the integer Takahashi will get minus the integer Nakahashi will get:

• Each of them simultaneously calculate the sum of the integers that the other two people have, then replace his own integer with the result.

However, if the absolute value of the answer exceeds 10^{18}, print Unfair instead.

### Constraints

• 1 \leq A,B,C \leq 10^9
• 0 \leq K \leq 10^{18}
• All values in input are integers.

### Input

Input is given from Standard Input in the following format:

A B C K


### Output

Print the integer Takahashi will get minus the integer Nakahashi will get, after repeating the following operation K times. If the absolute value of the answer exceeds 10^{18}, print Unfair instead.

### Sample Input 1

1 2 3 1


### Sample Output 1

1


After one operation, Takahashi, Nakahashi and Hikuhashi have 5, 4 and 3, respectively. We should print 5-4=1.

### Sample Input 2

2 3 2 0


### Sample Output 2

-1


### Sample Input 3

1000000000 1000000000 1000000000 1000000000000000000


### Sample Output 3

0