use proconio::input; fn main() { input! { n: usize, } let ans = (8..=n).filter(|&x| x.to_string().contains("8")).count(); println!("{ans}"); }