fn main(){for io::stdin().each_line|l|{println(fmt!("0.%06u",((l.to_bytes().count(&l[0])-1)*2000000/(l.len()-2)+1)/2))}}