#!/usr/bin/env python3
s = input()
ans = 0
a = s.count('1')
b = s.count('0')
if a == 0 or b == 0:
    print(0)
    quit()
print(min(a, b)*2) s = input() s input() input ans = 0 ans 0 a = s.count('1') a s.count('1') s.count s count '1' b = s.count('0') b s.count('0') s.count s count '0' if a == 0 or b == 0:
    print(0)
    quit() a == 0 or b == 0 a == 0 a 0 b == 0 b 0 print(0) print 0 quit() quit print(min(a, b)*2) print min(a, b)*2 min(a, b) min a b 2 b = s.count('0') s.count('0') b s = input() input() s a = s.count('1') s.count('1') a ans = 0 0 ans
#!/usr/bin/env python3
s = input()
ans = 0
a = s.count('1')
b = s.count('0')
if a == 0 or b == 0:
    print(0)
    quit()
print(min(a, b)*2)
