c = list(input())
c0 = c.count("0")
c1 = c.count("1")
print(min(c0, c1) * 2)
 c = list(input()) c list(input()) list input() input c0 = c.count("0") c0 c.count("0") c.count c count "0" c1 = c.count("1") c1 c.count("1") c.count c count "1" print(min(c0, c1) * 2) print min(c0, c1) * 2 min(c0, c1) min c0 c1 2 c0 = c.count("0") c.count("0") c0 c = list(input()) list(input()) c c1 = c.count("1") c.count("1") c1
c = list(input())
c0 = c.count("0")
c1 = c.count("1")
print(min(c0, c1) * 2)

