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