S = input()
chara0 = S.count('0')
chara1 = S.count('1')
if chara0 < chara1:
    print(chara0 * 2)
else:
    print(chara1 * 2) S = input() S input() input chara0 = S.count('0') chara0 S.count('0') S.count S count '0' chara1 = S.count('1') chara1 S.count('1') S.count S count '1' if chara0 < chara1:
    print(chara0 * 2)
else:
    print(chara1 * 2) chara0 < chara1 chara0 chara1 print(chara0 * 2) print chara0 * 2 chara0 2 print(chara1 * 2) print chara1 * 2 chara1 2 chara1 = S.count('1') S.count('1') chara1 chara0 = S.count('0') S.count('0') chara0 S = input() input() S
S = input()
chara0 = S.count('0')
chara1 = S.count('1')
if chara0 < chara1:
    print(chara0 * 2)
else:
    print(chara1 * 2)