#n=int(input())
#n,m=map(int,input().split())
#al=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
s=list(input())

count1=s.count("1")
count0=s.count("0")

print(min(count1,count0)*2) s=list(input()) s list(input()) list input() input count1=s.count("1") count1 s.count("1") s.count s count "1" count0=s.count("0") count0 s.count("0") s.count s count "0" print(min(count1,count0)*2) print min(count1,count0)*2 min(count1,count0) min count1 count0 2 count1=s.count("1") s.count("1") count1 count0=s.count("0") s.count("0") count0 s=list(input()) list(input()) s
#n=int(input())
#n,m=map(int,input().split())
#al=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
s=list(input())

count1=s.count("1")
count0=s.count("0")

print(min(count1,count0)*2)
