N = input()
count0 = N.count('0')
count1 = len(N)-count0
print(min(count0,count1)*2) N = input() N input() input count0 = N.count('0') count0 N.count('0') N.count N count '0' count1 = len(N)-count0 count1 len(N)-count0 len(N) len N count0 print(min(count0,count1)*2) print min(count0,count1)*2 min(count0,count1) min count0 count1 2 N = input() input() N count0 = N.count('0') N.count('0') count0 count1 = len(N)-count0 len(N)-count0 count1
N = input()
count0 = N.count('0')
count1 = len(N)-count0
print(min(count0,count1)*2)