def resolve():
    s = input()
    cnt_zero = s.count('0')
    cnt_one = s.count('1')

    print(min(cnt_one, cnt_zero) * 2)
    
resolve() def resolve():
    s = input()
    cnt_zero = s.count('0')
    cnt_one = s.count('1')

    print(min(cnt_one, cnt_zero) * 2)
     resolve s = input() s input() input cnt_zero = s.count('0') cnt_zero s.count('0') s.count s count '0' cnt_one = s.count('1') cnt_one s.count('1') s.count s count '1' print(min(cnt_one, cnt_zero) * 2) print min(cnt_one, cnt_zero) * 2 min(cnt_one, cnt_zero) min cnt_one cnt_zero 2 resolve() resolve def resolve():
    s = input()
    cnt_zero = s.count('0')
    cnt_one = s.count('1')

    print(min(cnt_one, cnt_zero) * 2)
     def resolve():
    s = input()
    cnt_zero = s.count('0')
    cnt_one = s.count('1')

    print(min(cnt_one, cnt_zero) * 2)
     resolve
def resolve():
    s = input()
    cnt_zero = s.count('0')
    cnt_one = s.count('1')

    print(min(cnt_one, cnt_zero) * 2)
    
resolve()