from collections import Counter

def solve():
    A = input()
    c = Counter(A)

    return min(c['0'], c['1']) * 2

print(solve()) from collections import Counter def solve():
    A = input()
    c = Counter(A)

    return min(c['0'], c['1']) * 2 solve A = input() A input() input c = Counter(A) c Counter(A) Counter A return min(c['0'], c['1']) * 2 min(c['0'], c['1']) * 2 min(c['0'], c['1']) min c['0'] c '0' c['1'] c '1' 2 print(solve()) print solve() solve def solve():
    A = input()
    c = Counter(A)

    return min(c['0'], c['1']) * 2 def solve():
    A = input()
    c = Counter(A)

    return min(c['0'], c['1']) * 2 solve
from collections import Counter

def solve():
    A = input()
    c = Counter(A)

    return min(c['0'], c['1']) * 2

print(solve())