s = [int(i) for i in s]
l = len(s)
su = sum(s)
if l != 0 and su != 0 and su != l:
        for i in range(int(l)):
                if s[i] != s[i+1]:
                        s.pop(i)
                        s.pop(i)
                        count += 2
                        break
else:
        print(count)
        break