# -*- coding: utf-8 -*-

def main():
    s = input().split(" ")

    sl = list(s[0])
    prev = -1
    n = 0
    while True:
        # print(str(sl))
        if len(sl) < 1:
            break
        kita = False
        for i, c in enumerate(sl):
            if i == 0 and prev != -1:
                break
            if (prev == 0 and c == '1') or (prev == 1 and c == '0'):
                kita = True
                # print("remove", i, prev, c)
                del sl[i]
                del sl[i-1]
                n += 2
                prev = -1
                break
            else:
                kita = True
                prev = int(c)

        if not kita:
            break

    print(n)

main()
