a=list(input())
temp1=0
temp0=0

for i in range(len(a)):
    if a[i]=="0":
        temp0+=1
    else:
        temp1+=1
print(min(temp0,temp1)*2) a=list(input()) a list(input()) list input() input temp1=0 temp1 0 temp0=0 temp0 0 for i in range(len(a)):
    if a[i]=="0":
        temp0+=1
    else:
        temp1+=1 i range(len(a)) range len(a) len a if a[i]=="0":
        temp0+=1
    else:
        temp1+=1 a[i]=="0" a[i] a i "0" temp0+=1 temp0 1 temp1+=1 temp1 1 print(min(temp0,temp1)*2) print min(temp0,temp1)*2 min(temp0,temp1) min temp0 temp1 2 temp0+=1 1 temp0 temp1=0 0 temp1 a=list(input()) list(input()) a temp1+=1 1 temp1 temp0=0 0 temp0
a=list(input())
temp1=0
temp0=0

for i in range(len(a)):
    if a[i]=="0":
        temp0+=1
    else:
        temp1+=1
print(min(temp0,temp1)*2)
