fn main(){for io::stdin().each_line|a|{print(fmt!("%.6f ",(str::to_chars(a).count(~a.char_at(0))-1)as float/(a.len()as float-2.)))}}