use std::io::{self, BufRead}; fn get_lines() -> Vec { let stdin = io::stdin(); let lines: Vec = stdin.lock().lines().map(|l| l.unwrap()).collect(); return lines; } fn main(){ let s = &get_lines()[0]; let l = s.len(); let mut i = 0; for c in s.chars().rev() { if c == 'c' { println!("{}", if l / 2 > i { i } else { l - i - 1 }); return; } i += 1; } }