s = list(input())
cnt = 0


while True:
    for i in range(len(s)-1):
        if s[i] + s[i+1] == "01" or s[i] + s[i+1] == "10":
            del s[i]
            del s[i]
            cnt += 2
            break
    else:
        break
print(cnt)
