S = input().strip()
N = len(S)
cnt = 0
for i in range(N):
    if S[i]=="1":
        cnt += 1
print(min(cnt,N-cnt)*2) S = input().strip() S input().strip() ().strip () input strip N = len(S) N len(S) len S cnt = 0 cnt 0 for i in range(N):
    if S[i]=="1":
        cnt += 1 i range(N) range N if S[i]=="1":
        cnt += 1 S[i]=="1" S[i] S i "1" cnt += 1 cnt 1 print(min(cnt,N-cnt)*2) print min(cnt,N-cnt)*2 min(cnt,N-cnt) min cnt N-cnt N cnt 2 cnt += 1 1 cnt cnt = 0 0 cnt S = input().strip() input().strip() S N = len(S) len(S) N
S = input().strip()
N = len(S)
cnt = 0
for i in range(N):
    if S[i]=="1":
        cnt += 1
print(min(cnt,N-cnt)*2)