fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: Vec = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); println!("{:.09}", 1000. - 1000. * a.iter().map(|&v| (1000. - v as f64) / 1000.).fold(1., |x, y| x * y)); }