s = list(map(int,input()))
cnt = 0
def func(s):
    for i, a in enumerate(zip(s, s[1:])):
        if a[0]^a[1] == 1:
            global cnt
            cnt += 2
            s.pop(i)
            s.pop(i)
            return func(s)

func(s)
print(cnt)