s = input()
count1 = s.count("1")
count0 = s.count("0")
if count0 == count1 :
    print(len(s))
else :
    print(min(count1, count0)*2) s = input() s input() input count1 = s.count("1") count1 s.count("1") s.count s count "1" count0 = s.count("0") count0 s.count("0") s.count s count "0" if count0 == count1 :
    print(len(s))
else :
    print(min(count1, count0)*2) count0 == count1 count0 count1 print(len(s)) print len(s) len s print(min(count1, count0)*2) print min(count1, count0)*2 min(count1, count0) min count1 count0 2 s = input() input() s count0 = s.count("0") s.count("0") count0 count1 = s.count("1") s.count("1") count1
s = input()
count1 = s.count("1")
count0 = s.count("0")
if count0 == count1 :
    print(len(s))
else :
    print(min(count1, count0)*2)
