import sys
import numpy as np
from collections import Counter, deque

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = input()
    red = s.count("0")
    blue = s.count("1")
    print(min(red, blue) * 2)


if __name__ == '__main__':
    resolve() import sys sys import numpy as np numpy from collections import Counter, deque sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 f_inf = float('inf') f_inf float('inf') float 'inf' mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 def resolve():
    s = input()
    red = s.count("0")
    blue = s.count("1")
    print(min(red, blue) * 2) resolve s = input() s input() input red = s.count("0") red s.count("0") s.count s count "0" blue = s.count("1") blue s.count("1") s.count s count "1" print(min(red, blue) * 2) print min(red, blue) * 2 min(red, blue) min red blue 2 if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve def resolve():
    s = input()
    red = s.count("0")
    blue = s.count("1")
    print(min(red, blue) * 2) def resolve():
    s = input()
    red = s.count("0")
    blue = s.count("1")
    print(min(red, blue) * 2) resolve f_inf = float('inf') float('inf') f_inf mod = 10 ** 9 + 7 10 ** 9 + 7 mod
import sys
import numpy as np
from collections import Counter, deque

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = input()
    red = s.count("0")
    blue = s.count("1")
    print(min(red, blue) * 2)


if __name__ == '__main__':
    resolve()
