import re

tmp = raw_input()

length = len(tmp)


tmp1 = tmp.replace("0", "")
tmp2 = tmp.replace("1", "")

if len(tmp1) > len(tmp2):
    tmp3 = len(tmp1) - len(tmp2)

else:
    tmp3 = len(tmp2) - len(tmp1)


division = length - tmp3

print(division)