import sys

def input():
    return sys.stdin.readline().rstrip()


def main():
    S =input()
    N = len(S)
    one = S.count("1")
    zero = N-one
    print(min(zero,one)*2)



if __name__ == "__main__":
    main() import sys sys def input():
    return sys.stdin.readline().rstrip() input return sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def main():
    S =input()
    N = len(S)
    one = S.count("1")
    zero = N-one
    print(min(zero,one)*2) main S =input() S input() input N = len(S) N len(S) len S one = S.count("1") one S.count("1") S.count S count "1" zero = N-one zero N-one N one print(min(zero,one)*2) print min(zero,one)*2 min(zero,one) min zero one 2 if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def input():
    return sys.stdin.readline().rstrip() def input():
    return sys.stdin.readline().rstrip() input def main():
    S =input()
    N = len(S)
    one = S.count("1")
    zero = N-one
    print(min(zero,one)*2) def main():
    S =input()
    N = len(S)
    one = S.count("1")
    zero = N-one
    print(min(zero,one)*2) main
import sys

def input():
    return sys.stdin.readline().rstrip()


def main():
    S =input()
    N = len(S)
    one = S.count("1")
    zero = N-one
    print(min(zero,one)*2)



if __name__ == "__main__":
    main()
