use proconio::{input, marker::Bytes}; fn main() { input! { s: Bytes } let ans = s .windows(3) .filter(|w| (w[0] == w[1]) != (w[1] == w[2])) .count(); println!("{ans}"); }