def resolve():
    S = str(input())
    ans = 2 * min(S.count('1'), S.count('0'))

    print(ans)
    return
resolve() def resolve():
    S = str(input())
    ans = 2 * min(S.count('1'), S.count('0'))

    print(ans)
    return resolve S = str(input()) S str(input()) str input() input ans = 2 * min(S.count('1'), S.count('0')) ans 2 * min(S.count('1'), S.count('0')) 2 min(S.count('1'), S.count('0')) min S.count('1') S.count S count '1' S.count('0') S.count S count '0' print(ans) print ans return resolve() resolve def resolve():
    S = str(input())
    ans = 2 * min(S.count('1'), S.count('0'))

    print(ans)
    return def resolve():
    S = str(input())
    ans = 2 * min(S.count('1'), S.count('0'))

    print(ans)
    return resolve
def resolve():
    S = str(input())
    ans = 2 * min(S.count('1'), S.count('0'))

    print(ans)
    return
resolve()