#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); long long N; if (!(cin >> N)) return 0; long long k = (N + 400) / 500; cout << k << '\n'; return 0; }