S = list(map(int,list(input())))
count0 = S.count(1)
count1 = S.count(0)
print(2*min(count0,count1)) S = list(map(int,list(input()))) S list(map(int,list(input()))) list map(int,list(input())) map int list(input()) list input() input count0 = S.count(1) count0 S.count(1) S.count S count 1 count1 = S.count(0) count1 S.count(0) S.count S count 0 print(2*min(count0,count1)) print 2*min(count0,count1) 2 min(count0,count1) min count0 count1 count0 = S.count(1) S.count(1) count0 S = list(map(int,list(input()))) list(map(int,list(input()))) S count1 = S.count(0) S.count(0) count1
S = list(map(int,list(input())))
count0 = S.count(1)
count1 = S.count(0)
print(2*min(count0,count1))