import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from math import ceil, floor, sqrt, gcd
from copy import deepcopy

def main():
    s = input()
    c_zero = s.count("0")
    c_one = s.count("1")
    num = min(c_one,c_zero)
    print(num*2)
    

if __name__ == "__main__":
    main() import os os import sys sys from collections import defaultdict, Counter from itertools import product, permutations,combinations, accumulate from operator import itemgetter from bisect import bisect_left,bisect from heapq import heappop,heappush from math import ceil, floor, sqrt, gcd from copy import deepcopy def main():
    s = input()
    c_zero = s.count("0")
    c_one = s.count("1")
    num = min(c_one,c_zero)
    print(num*2)
     main s = input() s input() input c_zero = s.count("0") c_zero s.count("0") s.count s count "0" c_one = s.count("1") c_one s.count("1") s.count s count "1" num = min(c_one,c_zero) num min(c_one,c_zero) min c_one c_zero print(num*2) print num*2 num 2 if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    s = input()
    c_zero = s.count("0")
    c_one = s.count("1")
    num = min(c_one,c_zero)
    print(num*2)
     def main():
    s = input()
    c_zero = s.count("0")
    c_one = s.count("1")
    num = min(c_one,c_zero)
    print(num*2)
     main
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from math import ceil, floor, sqrt, gcd
from copy import deepcopy

def main():
    s = input()
    c_zero = s.count("0")
    c_one = s.count("1")
    num = min(c_one,c_zero)
    print(num*2)
    

if __name__ == "__main__":
    main()