let rec solver lst =
	match lst with
	| [] -> 0
	| _::[] -> 0
	| x::y::xs ->
		if x = y
		then 0 + solver (y::xs)
		else 1 + solver (y::xs)

let _ = Scanf.scanf "%s\n" (fun x -> x)
		|> Extlib.ExtString.String.to_list
		|> solver
		|> Printf.printf "%d"