import sys
sys.setrecursionlimit(10**6)

s=list(input())
n=len(s)

#print(s[0],s[1])

cnt0=0
cnt1=0
for i in range(n):
    if s[i]=="0":
        cnt0+=1
    elif s[i]=="1":
        cnt1+=1

print(2*min(cnt0,cnt1)) import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 s=list(input()) s list(input()) list input() input n=len(s) n len(s) len s cnt0=0 cnt0 0 cnt1=0 cnt1 0 for i in range(n):
    if s[i]=="0":
        cnt0+=1
    elif s[i]=="1":
        cnt1+=1 i range(n) range n if s[i]=="0":
        cnt0+=1
    elif s[i]=="1":
        cnt1+=1 s[i]=="0" s[i] s i "0" cnt0+=1 cnt0 1 elif s[i]=="1":
        cnt1+=1 s[i]=="1" s[i] s i "1" cnt1+=1 cnt1 1 print(2*min(cnt0,cnt1)) print 2*min(cnt0,cnt1) 2 min(cnt0,cnt1) min cnt0 cnt1 cnt1=0 0 cnt1 cnt0+=1 1 cnt0 s=list(input()) list(input()) s n=len(s) len(s) n cnt1+=1 1 cnt1 cnt0=0 0 cnt0
import sys
sys.setrecursionlimit(10**6)

s=list(input())
n=len(s)

#print(s[0],s[1])

cnt0=0
cnt1=0
for i in range(n):
    if s[i]=="0":
        cnt0+=1
    elif s[i]=="1":
        cnt1+=1

print(2*min(cnt0,cnt1))
