Sum of Two Integers

MediumBit Manipulation
Next
Bit ManipulationMath

Compute the sum of two integers a and b without using the + or - operators. Use bitwise operations instead.

Input

A single line with two integers a and b.

Output

Print a + b.

Constraints

-1000 <= a, b <= 1000

Example 1
Input
1 2
Output
3

1 + 2 = 3.

Example 2
Input
-2 3
Output
1

Negative numbers work because of two's complement.

Hints

Sum of Two Integers - Medium Bit Manipulation Problem | Skill Shiksha