s = list(input())
zero = s.count('0')
one = s.count('1')
puyo2 = min(zero, one)
print(2*puyo2) s = list(input()) s list(input()) list input() input zero = s.count('0') zero s.count('0') s.count s count '0' one = s.count('1') one s.count('1') s.count s count '1' puyo2 = min(zero, one) puyo2 min(zero, one) min zero one print(2*puyo2) print 2*puyo2 2 puyo2 puyo2 = min(zero, one) min(zero, one) puyo2 one = s.count('1') s.count('1') one s = list(input()) list(input()) s zero = s.count('0') s.count('0') zero
s = list(input())
zero = s.count('0')
one = s.count('1')
puyo2 = min(zero, one)
print(2*puyo2)