import java.util.*;

public class UnusualAdd {
    public static int addAB(int A, int B) {
        if(B==0){
            return A;
        }
        while (B!=0){
            int n1=A^B;
            int n2=(A&B)<<1;
            A=n1;
            B=n2;
        }
        return A;
    }
}