#include int main() { int n; scanf("%d", &n); printf("%d\n", (n - 100 + 499) / 500); return 0; }