import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int r = 0;
        for(int i = 100; i < 1000; ++i){
            if(f(i)) r++;
        }
        System.out.println(r);
    }
    static boolean f(int n){
        for(int i = 2; i < n; ++i){
            if(n % i == 0) return false;
        }
        return true;
    }
}