from functools import reduce
from fractions import gcd
import sys
input = sys.stdin.readline


def main():
    S = input()[:-1]

    ans = 0
    flg = True
    while flg:
        flg = False
        i = 0
        while i+2<=len(S):
            if S[i:i+2] in ['01', '10']:
                S = S[:i] + S[i+2:]
                flg = True
                ans += 2
                continue
            i += 1
    
    print(ans)


if __name__ == '__main__':
    main()