s = input()
c1 = 0
c0 = 0
for i in s:
    if i == '0':
        c0 += 1
    else:
        c1 += 1
print(2*min(c0, c1)) s = input() s input() input c1 = 0 c1 0 c0 = 0 c0 0 for i in s:
    if i == '0':
        c0 += 1
    else:
        c1 += 1 i s if i == '0':
        c0 += 1
    else:
        c1 += 1 i == '0' i '0' c0 += 1 c0 1 c1 += 1 c1 1 print(2*min(c0, c1)) print 2*min(c0, c1) 2 min(c0, c1) min c0 c1 c0 += 1 1 c0 s = input() input() s c1 = 0 0 c1 c0 = 0 0 c0 c1 += 1 1 c1
s = input()
c1 = 0
c0 = 0
for i in s:
    if i == '0':
        c0 += 1
    else:
        c1 += 1
print(2*min(c0, c1))