open Batteries
let rec solve acc = function
  | (x::y::ys) ->
      let acc' = acc + if x = y then 0 else 1 in
      solve acc' (y::ys)
  | _ -> acc
let () =
  Scanf.scanf "%s" String.to_list |> solve 0 |> Printf.printf "%d\n"