open System
open System.Collections.Generic
open System.Linq


let read() = stdin.ReadLine()
let readInt() = stdin.ReadLine() |> int
let readIntArray() = stdin.ReadLine().Split(' ') |> Array.map int

let S = read()

let red=query{
    for c in S do
    where (c='0')
    count
}

let blue=query{
    for c in S do
    where (c='0')
    count
}

printfn "%d" (min red blue * 2)