S = input()

count_0 = 0
count_1 = 0
for s in S:
    if s == "0":
        count_0 += 1
    else:
        count_1 += 1
        
print(2 * min(count_0, count_1)) S = input() S input() input count_0 = 0 count_0 0 count_1 = 0 count_1 0 for s in S:
    if s == "0":
        count_0 += 1
    else:
        count_1 += 1
         s S if s == "0":
        count_0 += 1
    else:
        count_1 += 1
         s == "0" s "0" count_0 += 1 count_0 1 count_1 += 1 count_1 1 print(2 * min(count_0, count_1)) print 2 * min(count_0, count_1) 2 min(count_0, count_1) min count_0 count_1 count_0 = 0 0 count_0 count_1 = 0 0 count_1 S = input() input() S count_1 += 1 1 count_1 count_0 += 1 1 count_0
S = input()

count_0 = 0
count_1 = 0
for s in S:
    if s == "0":
        count_0 += 1
    else:
        count_1 += 1
        
print(2 * min(count_0, count_1))