s = str(input())
cnt = 0
start_s = ''
while start_s != s:
    start_s = s
    for i in range(len(s)-1):
        #print(s[:i],s[i:i+2],s[i+2:])
        if s[i:i+2] == '01' or s[i:i+2] == '10':
            cnt += 2
            s = s[:i]+s[i+2:]
            break
print(cnt)
