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