s = input()
n = len(s)
red = sum([ 1 for i in s if i == '0' ])
blue = n - red
print(n-abs(red-blue)) s = input() s input() input n = len(s) n len(s) len s 1 for i in s if i == '0' for i in s if i == '0' i s i == '0' i '0' if i == '0' 1 red = sum([ 1 for i in s if i == '0' ]) red sum([ 1 for i in s if i == '0' ]) sum [ 1 for i in s if i == '0' ] blue = n - red blue n - red n red print(n-abs(red-blue)) print n-abs(red-blue) n abs(red-blue) abs red-blue red blue n = len(s) len(s) n red = sum([ 1 for i in s if i == '0' ]) sum([ 1 for i in s if i == '0' ]) red blue = n - red n - red blue s = input() input() s
s = input()
n = len(s)
red = sum([ 1 for i in s if i == '0' ])
blue = n - red
print(n-abs(red-blue))