#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    S = input()

    ans = min(S.count('0'), S.count('1'))
    print(ans * 2)


if __name__ == '__main__':
    main() import sys sys def input():
    return sys.stdin.readline()[:-1] input return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 def main():
    S = input()

    ans = min(S.count('0'), S.count('1'))
    print(ans * 2) main S = input() S input() input ans = min(S.count('0'), S.count('1')) ans min(S.count('0'), S.count('1')) min S.count('0') S.count S count '0' S.count('1') S.count S count '1' print(ans * 2) print ans * 2 ans 2 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    S = input()

    ans = min(S.count('0'), S.count('1'))
    print(ans * 2) def main():
    S = input()

    ans = min(S.count('0'), S.count('1'))
    print(ans * 2) main def input():
    return sys.stdin.readline()[:-1] def input():
    return sys.stdin.readline()[:-1] input
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    S = input()

    ans = min(S.count('0'), S.count('1'))
    print(ans * 2)


if __name__ == '__main__':
    main()
