use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let n: Vec = s.split_whitespace().skip(1).flat_map(str::parse).collect(); println!( "{}", 1000.0 - 1000. * n.iter().fold(1., |t, a| t * (1000. - a) / 1000.) ) }