#include #include using namespace std; using namespace atcoder; using ll = long long; using vi = vector; using vvi = vector; using vl = vector; using vvl = vector; using vs = vector; using vp = vector>; #define rep(i, s, n) for (int i = s; i < (int)(n); i++) #define sz(x) ((int)(x).size()) constexpr int INFI = 1001001001; constexpr ll INFL = (1LL << 60); int main (){ ios::sync_with_stdio(false); cin.tie(nullptr); // input int n; cin >> n; int ans = 0; while(n > 100){ n -= 500; ans ++; // cerr <<"n: "<< n << "\n" ; } cout << ans << endl; return 0; }