S = input()
length = len(S)
count_0 = 0
for i in range(length):
  if S[i] == '0':
    count_0 += 1
res = min(count_0, length - count_0) * 2
print(res) S = input() S input() input length = len(S) length len(S) len S count_0 = 0 count_0 0 for i in range(length):
  if S[i] == '0':
    count_0 += 1 i range(length) range length if S[i] == '0':
    count_0 += 1 S[i] == '0' S[i] S i '0' count_0 += 1 count_0 1 res = min(count_0, length - count_0) * 2 res min(count_0, length - count_0) * 2 min(count_0, length - count_0) min count_0 length - count_0 length count_0 2 print(res) print res count_0 = 0 0 count_0 count_0 += 1 1 count_0 S = input() input() S length = len(S) len(S) length res = min(count_0, length - count_0) * 2 min(count_0, length - count_0) * 2 res
S = input()
length = len(S)
count_0 = 0
for i in range(length):
  if S[i] == '0':
    count_0 += 1
res = min(count_0, length - count_0) * 2
print(res)