s = list(input())
red = s.count("0")
blue = len(s) - red

print(min(red, blue)*2) s = list(input()) s list(input()) list input() input red = s.count("0") red s.count("0") s.count s count "0" blue = len(s) - red blue len(s) - red len(s) len s red print(min(red, blue)*2) print min(red, blue)*2 min(red, blue) min red blue 2 s = list(input()) list(input()) s red = s.count("0") s.count("0") red blue = len(s) - red len(s) - red blue
s = list(input())
red = s.count("0")
blue = len(s) - red

print(min(red, blue)*2)