Under construction

Still being built. Things may change

Calculate!

Time limit1sMemory limit256 MB

Summary
Given A, B and a huge count C, find the value of A after XORing B into it C times.
Level

Easy3 of 10

Topics
Bit manipulation, Math, Implementation
Solved
No attempts yet

Problem

Ingyu is famous for solving logical operations very quickly and accurately. To check whether the rumor is true, Gyojeong asked Ingyu a few questions.

  • Gyojeong: "Ingyu, what is 3 & 5?"
  • Ingyu: "The answer is 1."
  • Gyojeong: "Can I ask something a bit harder this time?"
  • Ingyu: "Of course."
  • Gyojeong: "Then what is 12345678 | 44555?"
  • Ingyu: "The answer is 12382031."

Ingyu answered every question correctly, one after another, so Gyojeong thought of something to test.

  • Gyojeong: "Ingyu, then can you also compute the number you get by XORing B into a number A, C times?"
  • Ingyu: "One second is enough for that."

Gyojeong wants to check whether the answer Ingyu gave in one second is correct. On Gyojeong's behalf, write a program that prints the number obtained by XORing BB into AA, CC times.

Input

The first line contains AA, BB, and CC, separated by spaces. (1≤A,B≤1081 \le A, B \le 10^8, 1≤C≤101001 \le C \le 10^{100})

Output

Print the result of XORing BB into AA, CC times. This is the value of AA after the operation A←A⊕BA \leftarrow A \oplus B is repeated CC times.

Examples2

  1. Example 1

    Input
    1 1 1
    
    Expected output
    0
    
  2. Example 2

    Input
    3 5 5
    
    Expected output
    6