A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.

Input

Input contains one integer number n (1 ≤ n ≤ 3000).

Output

Output the amount of almost prime numbers between 1 and n, inclusive.

Examples

Input

10


Output

2


Input

21


Output

8
import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		//int t = fs.nextInt();
		for (int k = 1; k <= 1; k++) {
			// int m = fs.nextInt();
			int n = fs.nextInt();
			// long k = fs.nextLong();
			// Long arr[] = fs.readLongArray(n);
			//Prime_Seive ps = new Prime_Seive();
			int result = 0;
			for (int a = 4; a <= n; a++) {
				int arr[] = new int[a + 1];
				prime_seive(a, arr);
				int count = 0;
				
				
				for (int i = 1; i <= a; i++) {
					// out.println(i+" "+arr[i]);
					if (arr[i] == 1 && a % i == 0) {
						 //out.print(count+" "+i+" "+a+" ; ");
						count++;
					}
				}
				if (count == 2) {
					result++;
				}
			}
			out.println(result);

			// out.println();

		}

		out.close();
	}

	public static Long solver(Long arr[], int n) {
		Long min = Long.MAX_VALUE;
		Long working = arr[0];
		Long operations = 0L;
		boolean dec = false;
		Long max = Long.MIN_VALUE;
		for (int i = 0; i < n; i++) {
			max = Math.max(max, arr[i]);
			if (arr[i] < max) {
				// System.out.println("max "+max+" "+arr[i]);
				dec = true;
			}
		}
		for (int i = 1; i <= n; i++) {
			if (i < n - 1 && arr[i] <= arr[i + 1] && !dec) {

				// System.out.println(arr[i]+" "+arr[i+1]);
				continue;
			}
			if (i < n - 1 && arr[i] <= arr[i + 1]) {
				working = arr[i + 1];
			}
			Long h = (i == n) ? Long.MAX_VALUE : arr[i];

			min = Math.min(min, h);
			if (h >= working && h != Long.MAX_VALUE) {
				System.out.println(working + " " + min + " " + operations);
				operations += working - min;
				System.out.println(operations);
				working = h;
				min = Long.MAX_VALUE;

			}
		}

		/*
		 * Stack<Long> stack=new Stack<>(); stack.push(arr[0]); Long operations=0L;
		 * boolean dec=false; for(int i=1;i<=n;i++){
		 * if(!stack.isEmpty()&&i<n&&arr[i]<stack.peek()){ dec=true; } Long
		 * h=(i==n)?Long.MAX_VALUE:arr[i]; while(stack.size()>1&&dec&&stack.peek()<h){
		 * operations++; Long element=stack.pop(); element++;
		 * if(element!=stack.peek()&&element!=h){ stack.push(element); } }
		 * if(stack.peek()>h){ stack.push(h); } else
		 * if(stack.peek()<h&&h!=Long.MAX_VALUE){ stack.pop(); stack.push(h); } }
		 */
		return operations;
	}
	public static void prime_seive(int n, int[] arr) {
        int limit=(int)Math.sqrt(n);
        Arrays.fill(arr,1);
        for (int i = 2; i <= limit; i ++) {
            if (arr[i] == 1) {
                //primes.add(i);
                for (int j = i * i; j <= n; j += i) {
                    arr[j] = 0;
                }
            }
        }
        
        arr[1] = arr[0]=0;

    }

	public static int gcd(int a, int b) {
		if (a == 0)
			return b;

		return gcd(b % a, a);
	}

	static int gcdCoeff(int a, int b, int arr[])// euclidean gcd + extended euclidean
	{
		if (b == 0)
			return a;
		int tmp[] = { 1, 1 };// must be 1,1, because at base step b=0, a=anything, 1.0+ 1.a=a
		int result = gcdCoeff(b, a % b, tmp);
		arr[0] = tmp[1];// x=y1
		arr[1] = (tmp[0] - (a / b) * tmp[1]);// y=(x1-(a/b)*y1)
		return result;
	}

	static class PairIndex {
		long val;
		long index;

		public PairIndex(long val, long index) {
			this.val = val;
			this.index = index;
		}

	}

	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");

		String next() {
			while (!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		int[] readIntArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		Long[] readLongArray(int n) {
			Long[] a = new Long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		long nextLong() {
			return Long.parseLong(next());
		}
	}
}