S=input()
cnt0 = 0
cnt1 = 0
for i in range(len(S)):
  if S[i]=='0':
    cnt0 += 1
  else:
    cnt1 += 1
print(min(cnt0, cnt1)*2) S=input() S input() input cnt0 = 0 cnt0 0 cnt1 = 0 cnt1 0 for i in range(len(S)):
  if S[i]=='0':
    cnt0 += 1
  else:
    cnt1 += 1 i range(len(S)) range len(S) len S if S[i]=='0':
    cnt0 += 1
  else:
    cnt1 += 1 S[i]=='0' S[i] S i '0' cnt0 += 1 cnt0 1 cnt1 += 1 cnt1 1 print(min(cnt0, cnt1)*2) print min(cnt0, cnt1)*2 min(cnt0, cnt1) min cnt0 cnt1 2 cnt0 += 1 1 cnt0 cnt1 += 1 1 cnt1 cnt0 = 0 0 cnt0 cnt1 = 0 0 cnt1 S=input() input() S
S=input()
cnt0 = 0
cnt1 = 0
for i in range(len(S)):
  if S[i]=='0':
    cnt0 += 1
  else:
    cnt1 += 1
print(min(cnt0, cnt1)*2)