import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()

    red = S.count('0')
    blue = len(S) - red

    print(min(red, blue) * 2)

    return


if __name__ == '__main__':
    main() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 MOD = 1000000007 MOD 1000000007 def main():
    S = readline().strip()

    red = S.count('0')
    blue = len(S) - red

    print(min(red, blue) * 2)

    return main S = readline().strip() S readline().strip() ().strip () readline strip red = S.count('0') red S.count('0') S.count S count '0' blue = len(S) - red blue len(S) - red len(S) len S red print(min(red, blue) * 2) print min(red, blue) * 2 min(red, blue) min red blue 2 return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main MOD = 1000000007 1000000007 MOD readline = sys.stdin.readline sys.stdin.readline readline INF = 1 << 60 1 << 60 INF read = sys.stdin.read sys.stdin.read read def main():
    S = readline().strip()

    red = S.count('0')
    blue = len(S) - red

    print(min(red, blue) * 2)

    return def main():
    S = readline().strip()

    red = S.count('0')
    blue = len(S) - red

    print(min(red, blue) * 2)

    return main readlines = sys.stdin.readlines sys.stdin.readlines readlines
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()

    red = S.count('0')
    blue = len(S) - red

    print(min(red, blue) * 2)

    return


if __name__ == '__main__':
    main()
