def main():
    s = input()
    kazu = len(s)
    onelen = 0
    zerolen = 0
    
    for i in range(kazu):
        if s[i] == "1":
            onelen += 1
        else:
            zerolen += 1
    
    print(min(onelen, zerolen) * 2)


if __name__ == "__main__":
    main() def main():
    s = input()
    kazu = len(s)
    onelen = 0
    zerolen = 0
    
    for i in range(kazu):
        if s[i] == "1":
            onelen += 1
        else:
            zerolen += 1
    
    print(min(onelen, zerolen) * 2) main s = input() s input() input kazu = len(s) kazu len(s) len s onelen = 0 onelen 0 zerolen = 0 zerolen 0 for i in range(kazu):
        if s[i] == "1":
            onelen += 1
        else:
            zerolen += 1
    
     i range(kazu) range kazu if s[i] == "1":
            onelen += 1
        else:
            zerolen += 1
    
     s[i] == "1" s[i] s i "1" onelen += 1 onelen 1 zerolen += 1 zerolen 1 print(min(onelen, zerolen) * 2) print min(onelen, zerolen) * 2 min(onelen, zerolen) min onelen zerolen 2 if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    s = input()
    kazu = len(s)
    onelen = 0
    zerolen = 0
    
    for i in range(kazu):
        if s[i] == "1":
            onelen += 1
        else:
            zerolen += 1
    
    print(min(onelen, zerolen) * 2) def main():
    s = input()
    kazu = len(s)
    onelen = 0
    zerolen = 0
    
    for i in range(kazu):
        if s[i] == "1":
            onelen += 1
        else:
            zerolen += 1
    
    print(min(onelen, zerolen) * 2) main
def main():
    s = input()
    kazu = len(s)
    onelen = 0
    zerolen = 0
    
    for i in range(kazu):
        if s[i] == "1":
            onelen += 1
        else:
            zerolen += 1
    
    print(min(onelen, zerolen) * 2)


if __name__ == "__main__":
    main()