IT City company developing computer games decided to upgrade its way to reward its employees. Now it looks the following way. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is not divisible by any number from 2 to 10 every developer of this game gets a small bonus.

A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.

Input

The only line of the input contains one integer n (1 ≤ n ≤ 1018) — the prediction on the number of people who will buy the game.

Output

Output one integer showing how many numbers from 1 to n are not divisible by any number from 2 to 10.

Examples

Input

12


Output

2
/*
     * Code Author: Akshay Miterani
     * DA-IICT
     */
    import java.io.*;
    import java.util.*;
    
     
    public class MainY {
     
    	static double eps=(double)1e-6;
    	static long mod=(int)1e9+7;
    	static boolean f=true;
    	public static void main(String args[]){
    		InputReader in = new InputReader(System.in);
    		OutputStream outputStream = System.out;
    		PrintWriter out = new PrintWriter(outputStream);
    		//----------My Code Starts Here----------
    		long n=in.nextLong();
    		// 2 3 2 5 7 2 3
    		long d2=n/2;
    		long d3=n/3;
    		long d5=n/5;
    		long d7=n/7;
    		
    		long d23=n/6;
    		long d25=n/10;
    		long d27=n/14;
    		long d35=n/15;
    		long d37=n/21;
    		long d57=n/35;
    		
    		long d235=n/30;
    		long d237=n/42;
    		long d257=n/70;
    		long d357=n/105;
    		
    		long d2357=n/210;
    		long ans=d2+d3+d5+d7-d23-d25-d27-d35-d37-d57+d235+d237+d257+d357-d2357;
    		
    		out.println(n-ans);
    		out.close();
    		//---------------The End------------------
    	}
    	static double modulo(double a,int b) {
    	    double x=1;
    	    	    double y=a;
    	    	    while(b > 0){
    	    	        if(b%2 == 1){
    	    	            x=(x*y);
    	    	        }
    	    	        y = (y*y); // squaring the base
    	    	        b /= 2;
    	    	    }
    	    	    return x;
    	    }
    	static class Pair implements Comparable<Pair>{
    		int r1=-1;
    		int r2=-1;
    		int extra=0;
			@Override
			public int compareTo(Pair arg0) {
				// TODO Auto-generated method stub
				return 0;
			}
    	}
    	
    	static class InputReader {
    	    public BufferedReader reader;
    	    public StringTokenizer tokenizer;
     
    	    public InputReader(InputStream inputstream) {
    	      reader = new BufferedReader(new InputStreamReader(inputstream));
    	      tokenizer = null;
    	    }
    	    
    	    public String nextLine(){
    	    	String fullLine=null;
    	    	while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	            try {
    	              fullLine=reader.readLine();
    	            } catch (IOException e) {
    	              throw new RuntimeException(e);
    	            }
    	            return fullLine;
    	          }
    	          return fullLine;
    	    }
    		public String next() {
    	      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	        try {
    	          tokenizer = new StringTokenizer(reader.readLine());
    	        } catch (IOException e) {
    	          throw new RuntimeException(e);
    	        }
    	      }
    	      return tokenizer.nextToken();
    	    }
    		public long nextLong() {
    		      return Long.parseLong(next());
    		    }
    	    public int nextInt() {
    	      return Integer.parseInt(next());
    	    }
    	  }
    } 