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