**Description:**

You’re given two integers, `n`

and `m`

. Find position of the rightmost pair of equal bits in their binary representations (it is guaranteed that such a pair exists), counting from right to left.

Return the value of `2`

(0-based).^{position_of_the_found_pair}

**Example**

For `n = 10`

and `m = 11`

, the output should be

`equalPairOfBits(n, m) = 2`

.

`10`

, _{10} = 10**1**0_{2}`11`

, the position of the rightmost pair of equal bits is the bit at position _{10} = 10**1**1_{2}`1`

(0-based) from the right in the binary representations.

So the answer is `2`

.^{1} = 2

**Input/Output**

**[time limit] 3000ms (cs)**

**[input] integer n***Constraints:*

`0 ≤ n ≤ 2`

.^{30}

**[input] integer m***Constraints:*

`0 ≤ m ≤ 2`

.^{30}

**[output] integer**

**Tests:**

**Solution:**

int equalPairOfBits(int n, int m) { return n + m + 1 & ~m - n ; }