#include<iostream> #include<cstring> using namespace std; int isPrime[1001]; bool func(int num){ for (int i = 2; i < num; i++){ if (num%i == 0) isPrime[num] = 0; } if (isPrime[num] == -1) { isPrime[num] = 1; return true; } for (int i = 2; i < num; i++){ if (isPrime[i] == 1){ int buf = i; while (buf <= num){ if (buf == num) return true; buf *= i; } } } return false; } int main(){ int n; cin >> n; int res = 0; memset(isPrime, -1, 1001); for (int i = 2; i <= n; i++){ if (func(i)) res++; } cout << res; return 0; }