s=list(input())
from collections import Counter
d=Counter(s)
print(min(d["0"], d["1"])*2) s=list(input()) s list(input()) list input() input from collections import Counter d=Counter(s) d Counter(s) Counter s print(min(d["0"], d["1"])*2) print min(d["0"], d["1"])*2 min(d["0"], d["1"]) min d["0"] d "0" d["1"] d "1" 2 s=list(input()) list(input()) s d=Counter(s) Counter(s) d
s=list(input())
from collections import Counter
d=Counter(s)
print(min(d["0"], d["1"])*2)