S=list(map(int, list(input())))

num1 = sum(S)
num0 = len(S) - num1

print(min(num1,num0)*2) S=list(map(int, list(input()))) S list(map(int, list(input()))) list map(int, list(input())) map int list(input()) list input() input num1 = sum(S) num1 sum(S) sum S num0 = len(S) - num1 num0 len(S) - num1 len(S) len S num1 print(min(num1,num0)*2) print min(num1,num0)*2 min(num1,num0) min num1 num0 2 S=list(map(int, list(input()))) list(map(int, list(input()))) S num0 = len(S) - num1 len(S) - num1 num0 num1 = sum(S) sum(S) num1
S=list(map(int, list(input())))

num1 = sum(S)
num0 = len(S) - num1

print(min(num1,num0)*2)