import sys
input = sys.stdin.readline

s = input()
count0 = s.count("0")
count1 = s.count("1")

print(2 * min(count0, count1)) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline s = input() s input() input count0 = s.count("0") count0 s.count("0") s.count s count "0" count1 = s.count("1") count1 s.count("1") s.count s count "1" print(2 * min(count0, count1)) print 2 * min(count0, count1) 2 min(count0, count1) min count0 count1 input = sys.stdin.readline sys.stdin.readline input s = input() input() s count1 = s.count("1") s.count("1") count1 count0 = s.count("0") s.count("0") count0
import sys
input = sys.stdin.readline

s = input()
count0 = s.count("0")
count1 = s.count("1")

print(2 * min(count0, count1))