Under construction

Still being built. Things may change

Shooting Bet

Time limit1sMemory limit1024 MB

Summary
Given the shoot totals of A and B, find C's total, which is the bitwise XOR of the two scores.
Level

Easy2 of 10

Topics
Bit manipulation, Math
Solved
No attempts yet

Problem

A, B, and C are attending reserve forces training again this year. The training includes a zeroing shoot where each of 10 targets is scored, and the total of the hit targets' scores is recorded. Hitting a target gives its score: 1, 2, 4, 8, 16, 32, 64, 128, 256, or 512 points, one per target. A target that is not hit gives no points. Each person can hit each target at most once.

A, B, and C bet on dinner after the training using their zeroing shoot scores. A and B shared their totals with each other, but C wanted the bet to be more exciting and did not share the score. Instead, C said:

"Every target that exactly one of you two hit, I hit. Every target that neither of you hit, or that both of you hit, I did not hit."

A and B cannot determine C's total from this alone, so they secretly asked you for help. Find C's score and help A and B!

Input

The first line contains integers SAS_A and SBS_B (0≤SA,SB≤1 0230 \le S_A, S_B \le 1\,023), the zeroing shoot totals of A and B. It is guaranteed that the scores of A and B can be written as sums of target scores.

Output

Print C's score.

Examples3

  1. Example 1

    Input
    55 73
    
    Expected output
    126
    
  2. Example 2

    Input
    105 47
    
    Expected output
    70
    
  3. Example 3

    Input
    197 197
    
    Expected output
    0