S = list(input())
one = S.count('1')
zero = S.count('0')

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

print(2*min(one,zero))