open Printf open Scanf
open Array

let () = scanf " %s" @@ fun s ->
  let r,b = ref 0,ref 0 in
  String.iter (fun c -> if c = '0' then
    r := !r + 1 else b := !b + 1) s;
  print_int @@ 2 * min !r !b