let s2l s =
  let rec iter i =
    if i = String.length s then
      []
    else String.get s i :: iter (i + 1)
  in iter 0
let () =
  let s = Scanf.scanf "%s" (fun s -> s) in
  let cl = s2l s in
  let c0 = cl |> List.filter (fun c -> c == '0') |> List.length in
  let c1 = cl |> List.filter (fun c -> c == '1') |> List.length in
  2 * min c0 c1 |> string_of_int |> print_endline

