#!/usr/bin/env python3

s = list(str(input()))

count_0 = 0
count_1 = 0
for i in s:
    if i == "0":
        count_0 += 1
    else:
        count_1 += 1

print(min(count_0, count_1)*2) s = list(str(input())) s list(str(input())) list str(input()) str input() input count_0 = 0 count_0 0 count_1 = 0 count_1 0 for i in s:
    if i == "0":
        count_0 += 1
    else:
        count_1 += 1 i s if i == "0":
        count_0 += 1
    else:
        count_1 += 1 i == "0" i "0" count_0 += 1 count_0 1 count_1 += 1 count_1 1 print(min(count_0, count_1)*2) print min(count_0, count_1)*2 min(count_0, count_1) min count_0 count_1 2 count_0 += 1 1 count_0 count_0 = 0 0 count_0 count_1 = 0 0 count_1 s = list(str(input())) list(str(input())) s count_1 += 1 1 count_1
#!/usr/bin/env python3

s = list(str(input()))

count_0 = 0
count_1 = 0
for i in s:
    if i == "0":
        count_0 += 1
    else:
        count_1 += 1

print(min(count_0, count_1)*2)
