import java.util.Scanner;
public class Main {

    static int countDivisors(int n)
    {
    	int count=0;
        for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        }
        return count;
    }
    	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int count=0;
		if (A==105) System.out.println(1);
		else if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0);
		
	}

} import java.util.Scanner; Scanner java.util public class Main {

    static int countDivisors(int n)
    {
    	int count=0;
        for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        }
        return count;
    }
    	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int count=0;
		if (A==105) System.out.println(1);
		else if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0);
		
	}

} Main static int countDivisors(int n)
    {
    	int count=0;
        for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        }
        return count;
    } countDivisors {
    	int count=0;
        for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        }
        return count;
    } int count=0; count 0 for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        } int i=1; int i=1; i 1 i<=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        } {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        } if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            } n%i==0 n%i n i 0 {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            } if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } n/i == i n/i n i i {
                	if(i%2!=0)
                		count++;
                } if(i%2!=0)
                		count++; i%2!=0 i%2 i 2 0 count++ count {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } if (i%2!=0) count++; i%2!=0 i%2 i 2 0 count++ count if ((n/i)%2!=0) count++; (n/i)%2!=0 (n/i)%2 (n/i) n i 2 0 count++ count return count; count int n n public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int count=0;
		if (A==105) System.out.println(1);
		else if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0);
		
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int count=0;
		if (A==105) System.out.println(1);
		else if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int count=0; count 0 if (A==105) System.out.println(1);
		else if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0); A==105 A 105 System.out.println(1) System.out.println System.out System System.out 1 if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0); A>105 A 105 {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		} while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			} A>105 A 105 {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			} if(countDivisors(A)==8) {
					count++;
				} countDivisors(A)==8 countDivisors(A) countDivisors A 8 {
					count++;
				} count++ count A-- A System.out.println(count+1) System.out.println System.out System System.out count+1 count 1 System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main {

    static int countDivisors(int n)
    {
    	int count=0;
        for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        }
        return count;
    }
    	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int count=0;
		if (A==105) System.out.println(1);
		else if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0);
		
	}

} public class Main {

    static int countDivisors(int n)
    {
    	int count=0;
        for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        }
        return count;
    }
    	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int count=0;
		if (A==105) System.out.println(1);
		else if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0);
		
	}

} Main
import java.util.Scanner;
public class Main {

    static int countDivisors(int n)
    {
    	int count=0;
        for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i) {
                	if(i%2!=0)
                		count++;
                }
                    
      
                else {
                	if (i%2!=0) count++;
                	if ((n/i)%2!=0) count++;
                } 
                    
            }
        }
        return count;
    }
    	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int count=0;
		if (A==105) System.out.println(1);
		else if(A>105) {
			while(A>105) {
				if(countDivisors(A)==8) {
					count++;
				}
				A--;
			}
			System.out.println(count+1);
		}
		else System.out.println(0);
		
	}

}
