use std::io::Read; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let h: usize = itr.next().unwrap().parse().unwrap(); let a: usize = itr.next().unwrap().parse().unwrap(); let d: usize = itr.next().unwrap().parse().unwrap(); let mut dp: Vec = vec![0.0; 100010]; dp[0] = 0.0; for i in 0..h + 1 { let mut res1: f32 = 1.0; let mut res2: f32 = 3.0 / 2.0; if i > a { res1 += dp[i - a]; } if i > d { res2 += dp[i - d]; } if res1 > res2 { dp[i] = res2; } else { dp[i] = res1; } } println!("{0:.4}", dp[h]); }