def solve():
    s = raw_input().strip()
    counter = [0, 0]
    for ch in s:
        counter[int(ch)] += 1

    diff = abs(counter[1] - counter[0])
    print len(s) - diff


if __name__ == '__main__':
    solve()
