import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    s = list(input())
    print(min(s.count('0'), s.count('1')) * 2)
        
if __name__ == '__main__':
    main() import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: 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 = list(input())
    print(min(s.count('0'), s.count('1')) * 2)
         main s = list(input()) s list(input()) list input() input print(min(s.count('0'), s.count('1')) * 2) print min(s.count('0'), s.count('1')) * 2 min(s.count('0'), s.count('1')) min s.count('0') s.count s count '0' s.count('1') s.count s count '1' 2 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def main():
    s = list(input())
    print(min(s.count('0'), s.count('1')) * 2)
         def main():
    s = list(input())
    print(min(s.count('0'), s.count('1')) * 2)
         main
import sys
input = lambda: sys.stdin.readline().rstrip()

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