Chouti was doing a competitive programming competition. However, after having all the problems accepted, he got bored and decided to invent some small games.

He came up with the following game. The player has a positive integer n. Initially the value of n equals to v and the player is able to do the following operation as many times as the player want (possibly zero): choose a positive integer x that x<n and x is not a divisor of n, then subtract x from n. The goal of the player is to minimize the value of n in the end.

Soon, Chouti found the game trivial. Can you also beat the game?

Input

The input contains only one integer in the first line: v (1 ≤ v ≤ 10^9), the initial value of n.

Output

Output a single integer, the minimum value of n the player can get.

Examples

Input


8


Output


1


Input


1


Output


1

Note

In the first example, the player can choose x=3 in the first turn, then n becomes 5. He can then choose x=4 in the second turn to get n=1 as the result. There are other ways to get this minimum. However, for example, he cannot choose x=2 in the first turn because 2 is a divisor of 8.

In the second example, since n=1 initially, the player can do nothing.
	import java.util.*;
	import java.io.*;
	import java.math.*;
	
	public class Practice 
	
	{ 
		   static FastReader sc=new FastReader(); 
		   static int mod=(int)Math.pow(10, 9)+7;
			  public static void main(String[] args)
	    {
				   int ttt =1;
				    	 //ttt=i();
			   
				 
	
		    	   PrintWriter out = new PrintWriter(System.out);
		    	   StringBuffer sb=new StringBuffer("");
		
				       outer: while (ttt-- > 0) 
						{	
				    	   int n=i();
				    	   if(n==2)
				    		   System.out.println(n);
				    	   else
				    		   System.out.println("1");
				    	  
						}
		    	   out.close();
		    	  // System.out.println(sb.toString());
				    	 
			    	  		   
	    }
			
			 
	static int[] input(int n) {
		int A[]=new int[n];
		   for(int i=0;i<n;i++) {
			   A[i]=sc.nextInt();
		   }
		   return A;
	   }
	static long[] inputL(int n) {
		long A[]=new long[n];
		   for(int i=0;i<n;i++) {
			   A[i]=sc.nextLong();
		   }
		   return A;
	   }
	static String[] inputS(int n) {
		String A[]=new String[n];
		   for(int i=0;i<n;i++) {
			   A[i]=sc.next();
		   }
		   return A;
	   }
	
	
	static void input(int A[],int B[]) {
		   for(int i=0;i<A.length;i++) {
			   A[i]=sc.nextInt();
			   B[i]=sc.nextInt();
		   }
	}
	static int[][] input(int n,int m){
		int A[][]=new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				A[i][j]=i();
			}
		}
		return A;
	}
	static int max(int A[]) {
		int max=Integer.MIN_VALUE;
		for(int i=0;i<A.length;i++) {
			max=Math.max(max, A[i]);
		}
		return max;
	}
	static int min(int A[]) {
		int min=Integer.MAX_VALUE;
		for(int i=0;i<A.length;i++) {
			min=Math.min(min, A[i]);
		}
		return min;
	}
	static long max(long A[]) {
		long max=Long.MIN_VALUE;
		for(int i=0;i<A.length;i++) {
			max=Math.max(max, A[i]);
		}
		return max;
	}
	static long min(long A[]) {
		long min=Long.MAX_VALUE;
		for(int i=0;i<A.length;i++) {
			min=Math.min(min, A[i]);
		}
		return min;
	}
	static long mod(long x) {
		 int mod=1000000007;
		  return ((x%mod + mod)%mod);
	}
	
	     static int i() {
	    	 return sc.nextInt();
	     }
	     static String s() {
	    	 return sc.next();
	     }
	     static long l() {
	    	 return sc.nextLong();
	     }  
	     static void sort(int[] A){
	        int n = A.length;
	        Random rnd = new Random();
	        for(int i=0; i<n; ++i){
	            int tmp = A[i];
	            int randomPos = i + rnd.nextInt(n-i);
	            A[i] = A[randomPos];
	            A[randomPos] = tmp;
	        }
	        Arrays.sort(A);
	     }
	     static void sort(long[] A){
		        int n = A.length;
		        Random rnd = new Random();
		        for(int i=0; i<n; ++i){
		            long tmp = A[i];
		            int randomPos = i + rnd.nextInt(n-i);
		            A[i] = A[randomPos];
		            A[randomPos] = tmp;
		        }
		        Arrays.sort(A);
		     }
	  static String sort(String s) {
	 	 Character ch[]=new Character[s.length()];
	 	 for(int i=0;i<s.length();i++) {
	 		 ch[i]=s.charAt(i);
	 	 }
	 	 Arrays.sort(ch);
	 	 StringBuffer st=new StringBuffer("");
	 	 for(int i=0;i<s.length();i++) {
	 		 st.append(ch[i]);
	 	 }
	 	 return st.toString();
	  }
	     static boolean prime(int n) 
		    { 
		        if (n <= 1) 
		            return false; 
		        if (n <= 3) 
		            return true; 
		        if (n % 2 == 0 || n % 3 == 0) 
		            return false; 
		        double sq=Math.sqrt(n);
		  
		        for (int i = 5; i <= sq; i = i + 6) 
		            if (n % i == 0 || n % (i + 2) == 0) 
		                return false; 
		        return true; 
		    } 
	     static boolean prime(long n) 
		    { 
		        if (n <= 1) 
		            return false; 
		        if (n <= 3) 
		            return true; 
		        if (n % 2 == 0 || n % 3 == 0) 
		            return false; 
		        double sq=Math.sqrt(n);
		  
		        for (int i = 5; i <= sq; i = i + 6) 
		            if (n % i == 0 || n % (i + 2) == 0) 
		                return false; 
		        return true; 
		    } 
	     static int gcd(int a, int b) 
	     { 
	         if (a == 0) 
	             return b; 
	         return gcd(b % a, a); 
	     } 
	     static long gcd(long a, long b) 
	     { 
	         if (a == 0) 
	             return b; 
	         return gcd(b % a, a); 
	     } 
	             
	        
	    static class FastReader 
	    { 
	        BufferedReader br; 
	        StringTokenizer st; 
	  
	        public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } 
	  
	        String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
	  
	        int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } 
	  
	        long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } 
	  
	        double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
	  
	        String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	    } 
	} 
