import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(500*500)
import itertools
from collections import Counter,deque

def main():

    s = list(input().rstrip())
    zero = 0
    one = 0
    for i in s:
        if i == "0":
            zero += 1
        else:
            one += 1
    print(2*min(zero,one))

if __name__=="__main__":
    main() import math math from math import gcd INF = float("inf") INF float("inf") float "inf" import sys sys input=sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(500*500) sys.setrecursionlimit sys setrecursionlimit 500*500 500 500 import itertools itertools from collections import Counter,deque def main():

    s = list(input().rstrip())
    zero = 0
    one = 0
    for i in s:
        if i == "0":
            zero += 1
        else:
            one += 1
    print(2*min(zero,one)) main s = list(input().rstrip()) s list(input().rstrip()) list input().rstrip() ().rstrip () input rstrip zero = 0 zero 0 one = 0 one 0 for i in s:
        if i == "0":
            zero += 1
        else:
            one += 1
     i s if i == "0":
            zero += 1
        else:
            one += 1
     i == "0" i "0" zero += 1 zero 1 one += 1 one 1 print(2*min(zero,one)) print 2*min(zero,one) 2 min(zero,one) min zero one if __name__=="__main__":
    main() __name__=="__main__" __name__ "__main__" main() main INF = float("inf") float("inf") INF input=sys.stdin.readline sys.stdin.readline input def main():

    s = list(input().rstrip())
    zero = 0
    one = 0
    for i in s:
        if i == "0":
            zero += 1
        else:
            one += 1
    print(2*min(zero,one)) def main():

    s = list(input().rstrip())
    zero = 0
    one = 0
    for i in s:
        if i == "0":
            zero += 1
        else:
            one += 1
    print(2*min(zero,one)) main
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(500*500)
import itertools
from collections import Counter,deque

def main():

    s = list(input().rstrip())
    zero = 0
    one = 0
    for i in s:
        if i == "0":
            zero += 1
        else:
            one += 1
    print(2*min(zero,one))

if __name__=="__main__":
    main()
