S = list(input())
Sremoved = [0] * len(S)

removed = 0
while True:
    removed_old = removed
    for i in range(len(S) - 1):
        if (Sremoved[i] == 0):
            idx1 = i
        for j in range(len(S)):
            if (Sremoved[i] == 0):
                idx2 = j
        if (int(S[idx1]) + int(S[idx2])) == 1:
            Sremoved[idx1] = 1
            Sremoved[idx2] = 1
            removed += 2
    if removed == removed_old:
        break
print(removed)