def main():
    S = input()
    L = len(S)
    c = S.count('0')
    print(min(c, L - c) * 2)


if __name__ == '__main__':
    main() def main():
    S = input()
    L = len(S)
    c = S.count('0')
    print(min(c, L - c) * 2) main S = input() S input() input L = len(S) L len(S) len S c = S.count('0') c S.count('0') S.count S count '0' print(min(c, L - c) * 2) print min(c, L - c) * 2 min(c, L - c) min c L - c L c 2 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    S = input()
    L = len(S)
    c = S.count('0')
    print(min(c, L - c) * 2) def main():
    S = input()
    L = len(S)
    c = S.count('0')
    print(min(c, L - c) * 2) main
def main():
    S = input()
    L = len(S)
    c = S.count('0')
    print(min(c, L - c) * 2)


if __name__ == '__main__':
    main()
