if __name__ == '__main__':
    S = str(input())
    N = len(S)

    answer = 0
    for i in range(0, N):
        index_00 = S.find('01')
        if index_00 != -1:
            answer += 2
            S = S[:index_00] + S[index_00+2:]
            continue
        index_11 = S.find('10')
        if index_11 != -1:
            answer += 2
            S = S[:index_11] + S[index_11+2:]
            continue
        if S.find('01') == -1 and S.find('10') == -1:
            break

    print(answer)