def main():
    S = input()
    cnt = 0
    for i in range(len(S)):
        if S.find("10") != -1 or S.find('01') != -1:
            if S.find("10") != -1:
                S = S.replace("10", "", 1)
                cnt += 1
            if S.find("01") != -1:
                S = S.replace("01", "", 1)
                cnt += 1
        else:
            break
    print(cnt*2)
if __name__ == "__main__":
    main()