s = str(input())
apple = []
for i in s:
    apple.append(i)
a = apple.count("1")
b = apple.count("0")
print(2 * (min(a, b))) s = str(input()) s str(input()) str input() input apple = [] apple [] for i in s:
    apple.append(i) i s apple.append(i) apple.append apple append i a = apple.count("1") a apple.count("1") apple.count apple count "1" b = apple.count("0") b apple.count("0") apple.count apple count "0" print(2 * (min(a, b))) print 2 * (min(a, b)) 2 min(a, b) min a b s = str(input()) str(input()) s a = apple.count("1") apple.count("1") a apple = [] [] apple b = apple.count("0") apple.count("0") b
s = str(input())
apple = []
for i in s:
    apple.append(i)
a = apple.count("1")
b = apple.count("0")
print(2 * (min(a, b)))