s = input()
red = s.count("0")
blue = s.count("1")

ans = min(red,blue)

print(ans*2) s = input() s input() input red = s.count("0") red s.count("0") s.count s count "0" blue = s.count("1") blue s.count("1") s.count s count "1" ans = min(red,blue) ans min(red,blue) min red blue print(ans*2) print ans*2 ans 2 s = input() input() s blue = s.count("1") s.count("1") blue ans = min(red,blue) min(red,blue) ans red = s.count("0") s.count("0") red
s = input()
red = s.count("0")
blue = s.count("1")

ans = min(red,blue)

print(ans*2)
