S = list(input())
L = len(S)
from collections import Counter
c = Counter(S)
one = c['1']
zero = c['0']

print(L-abs(one-zero)) S = list(input()) S list(input()) list input() input L = len(S) L len(S) len S from collections import Counter c = Counter(S) c Counter(S) Counter S one = c['1'] one c['1'] c '1' zero = c['0'] zero c['0'] c '0' print(L-abs(one-zero)) print L-abs(one-zero) L abs(one-zero) abs one-zero one zero one = c['1'] c['1'] one S = list(input()) list(input()) S zero = c['0'] c['0'] zero L = len(S) len(S) L c = Counter(S) Counter(S) c
S = list(input())
L = len(S)
from collections import Counter
c = Counter(S)
one = c['1']
zero = c['0']

print(L-abs(one-zero))