Given two integers, write a method to calculate the sum without using plus sign.

**Example:**

Input 1: 1 Input 2: 4 Output: 5

Need a **hand?** Try out these hints, one at a time.

Sum of two bits can be obtained by performing `XOR (^)`

of the two bits. Carry bit can be obtained by performing AND (&) of two bits.

1. If the first input is `0`

, return second input.

2. If the second input is `0`

, return first input.

3. Otherwise, calculate the sum as `input1 ^ input2`

4. Calculate the carry bit as `input1 & input2`

5. Shift the carry bit by one as `carry = carry << 1`

6. Return `addNumbers(sum, carry)`

.

public static int addNumbers(int input1,int input2){ }

**C**

**Java**

**Python**