# author:  Taichicchi
# created: 12.09.2020 12:29:36

from collections import Counter
import sys

S = input()

c = Counter(S)

print(len(S) - abs(c["0"] - c["1"])) from collections import Counter import sys sys S = input() S input() input c = Counter(S) c Counter(S) Counter S print(len(S) - abs(c["0"] - c["1"])) print len(S) - abs(c["0"] - c["1"]) len(S) len S abs(c["0"] - c["1"]) abs c["0"] - c["1"] c["0"] c "0" c["1"] c "1" c = Counter(S) Counter(S) c S = input() input() S
# author:  Taichicchi
# created: 12.09.2020 12:29:36

from collections import Counter
import sys

S = input()

c = Counter(S)

print(len(S) - abs(c["0"] - c["1"]))
