s = list(map(int,list(input())))
c = 0
while s :
    t = len(s)
    for i in range(t-1):
        if (s[i] == 0 and s[i+1] == 1) or (s[i] == 1 and s[i+1] == 0):
            s.remove(s[i])
            s.remove(s[i])
            c += 2
            break
    else:
        print(c)
        exit()

print(c)
    