use proconio::input; fn main() { input! { n: i64, } println!( "{}", (n - 99) / 500 + if (n - 99) % 500 == 0 { 0 } else { 1 } ); }