import collections
S=list(str(input()))
cc=collections.Counter(S)
ans=min(cc['0'],cc['1'])
print(ans*2) import collections collections S=list(str(input())) S list(str(input())) list str(input()) str input() input cc=collections.Counter(S) cc collections.Counter(S) collections.Counter collections Counter S ans=min(cc['0'],cc['1']) ans min(cc['0'],cc['1']) min cc['0'] cc '0' cc['1'] cc '1' print(ans*2) print ans*2 ans 2 S=list(str(input())) list(str(input())) S cc=collections.Counter(S) collections.Counter(S) cc ans=min(cc['0'],cc['1']) min(cc['0'],cc['1']) ans
import collections
S=list(str(input()))
cc=collections.Counter(S)
ans=min(cc['0'],cc['1'])
print(ans*2)