# ABC120 C - Unification
# 2019/10/28

def main():
    S = list(map(int, list(open(0).read())))
#     print(S)
    
    cnt = 0
    i=0

    while (i<len(S)-1):
        if (S[i] == 0 and S[i+1] == 1) or (S[i] == 1 and S[i+1] == 0):
            S.pop(i)
            S.pop(i)
            cnt+=2
#             print("i={0}, S={1}, cnt={2}".format(i, S, cnt))
            i=0
        i+=1
    
    print(cnt)
    
    
if __name__ == "__main__":
    main()