December long challenge Addition

I am not able to find a problem in this code please let me know where i am failing


{
int max = 0;
int isFound = find(s2);
int tempmax = 0;
int carry = 0;
for (int i = s.length() - 1; i >= 0; i–) {
int first = (int) (s.charAt(i) - ‘0’);
int second = (int) (s2.charAt(i) - ‘0’);
carry = carry + first + second;
if (carry > 1) tempmax++;
else tempmax = 0;
if(carry==3) carry = 1;
carry /= 2;
max = Math.max(max, tempmax+1);
}
return max*isFound;
}

public static int find(String s) {
    for (char c : s.toCharArray())
        if (c == '1') return 1;
    return 0;
}