s = input()
a,b = 0,0
for i in range(len(s)):
    if s[i] == '0':
        a += 1
    else:
        b += 1

if a == 0 or b == 0:
    print(0)
else:
    print(min(a,b)*2) s = input() s input() input a,b = 0,0 a 0 b 0 for i in range(len(s)):
    if s[i] == '0':
        a += 1
    else:
        b += 1 i range(len(s)) range len(s) len s if s[i] == '0':
        a += 1
    else:
        b += 1 s[i] == '0' s[i] s i '0' a += 1 a 1 b += 1 b 1 if a == 0 or b == 0:
    print(0)
else:
    print(min(a,b)*2) a == 0 or b == 0 a == 0 a 0 b == 0 b 0 print(0) print 0 print(min(a,b)*2) print min(a,b)*2 min(a,b) min a b 2 a,b = 0,0 0 a a += 1 1 a s = input() input() s b += 1 1 b b = 0,0 0 b
s = input()
a,b = 0,0
for i in range(len(s)):
    if s[i] == '0':
        a += 1
    else:
        b += 1

if a == 0 or b == 0:
    print(0)
else:
    print(min(a,b)*2)