import java.util.*;
public class UnusualAdd {
public int addAB(int A, int B) {
if(B == 0){
return A;
}
int sum = 0;
int temp = 0;
while(B != 0){
sum = A^B;
temp = (A & B) << 1;
A = sum;
B = temp;
}
return sum;
}
}