```
class Solution {
public:
int getSum(int a, int b) {
if (a == 0) return b;
if (b == 0) return a;
// x > 0 and y > 0
while (b){
int x = a ^ b, y = (a & b) << 1;
a = x; b = y;
}
return a;
}
};
```