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.
/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
    public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		FastReader sc=new FastReader();
// 		constructST(a,n);RMQ(n, qs, qe)
        // sieveOfEratosthenes();
		int n=sc.nextInt();
		if(n==2)
		    System.out.println(n);
		else
		System.out.println("1");
	}
	static int lower_bound(int a[],int x){
         int n=a.length,low=0,high=n-1,res=-1;
         while(low<=high){
             int mid=(low+high)>>1;
             if(a[mid]>=x){
                res=mid;high=mid-1;
             }
             else 
                low=mid+1;
         }
         return res;
     }
      static int upper_bound(int a[],int x){
          int n=a.length,low=0,high=n-1,res=-1;
          while(low<=high){
              int mid=(low+high)>>1;
              if(a[mid]<=x){
                  res=mid;low=mid+1;
              }
              else 
                  high=mid-1;
          }
          return res;
      }
    //   static int MAX=1000001;boolean prime[] = new boolean[MAX]; 
      
    //   static void sieveOfEratosthenes() { 
    //       for(int m9=0;m9<MAX;m9++) prime[m9]=true;
    //     for(int p = 2; p*p <=n; p++) { 
    //         if(prime[p] == true) 
    //         { 
    //             // Update all multiples of p 
    //             for(int i = p*2; i <= n; i += p) 
    //                 prime[i] = false; 
    //         } 
    //     } 
    //   }
      static int st[]; 
//		Make a utility function to store minimum in a given range
		static int minVal(int x,int y) {
			return (Math.min(x, y));
		}
//	    Make a utility function to calculate middle index
		static int getMid(int s,int e) {
			return (s+(e-s)/2);
		}
	    static int RMQUtil(int ss,int se,int qs,int qe,int index) {
//	    	case of complete overlap
	    	if(qs<=ss && qe>=se) 
	    		return st[index];
	    	//if this segment is outside the given range
	    	if(qs>se || qe<ss)
	    		return Integer.MAX_VALUE;
//	    	Case of partial overlap
	    	int mid=getMid(ss,se);
	    	return minVal(RMQUtil(ss, mid, qs, qe, 2*index+1),RMQUtil(mid+1, se, qs, qe, 2*index+2));
	    }
	    static int RMQ(int n,int qs,int qe) {
	    	if(qs<0 || qs>qe || qe>n-1)
	    		return -1;
	    	return RMQUtil(0, n-1, qs, qe,0);
	    }
	    static int constructSTUtil(int arr[], int ss, int se, int si) { 
	        // If there is one element in array, store it in current 
	        //  node of segment tree and return 
	        if (ss == se) { 
	            st[si] = arr[ss]; 
	            return arr[ss]; 
	        } 
	  
	        // If there are more than one elements, then recur for left and 
	        // right subtrees and store the minimum of two values in this node 
	        int mid = getMid(ss, se); 
	        st[si] = minVal(constructSTUtil(arr, ss, mid, si * 2 + 1), 
	                constructSTUtil(arr, mid + 1, se, si * 2 + 2)); 
	        return st[si]; 
	    } 
		static void constructST(int arr[],int n) {
//			Height of segment tree
			int x=(int)(Math.ceil(Math.log(n)/Math.log(2)));
//			Maximum size of segment tree
			int max_size=2*(int)Math.pow(2,x)-1;
			st=new int[max_size];
			constructSTUtil(arr,0,n-1,0);
		}
		  static void updateValueUtil(int ss, int se, int i, int diff, int si) { 
        // Base Case: If the input index lies outside the range of  
        // this segment 
        if (i < ss || i > se) 
            return; 
  
        // If the input index is in range of this node, then update the 
        // value of the node and its children 
        st[si] = st[si] + diff; 
        if (se != ss) { 
            int mid = getMid(ss, se); 
            updateValueUtil(ss, mid, i, diff, 2 * si + 1); 
            updateValueUtil(mid + 1, se, i, diff, 2 * si + 2); 
        } 
    } 
  
    // The function to update a value in input array and segment tree. 
   // It uses updateValueUtil() to update the value in segment tree 
      static void updateValue(int arr[], int n, int i, int new_val) { 
        // Check for erroneous input index 
        if (i < 0 || i > n - 1) { 
            System.out.println("Invalid Input"); 
            return; 
        } 
  
        // Get the difference between new value and old value 
        int diff = new_val - arr[i]; 
  
        // Update the value in array 
        arr[i] = new_val; 
  
        // Update the values of nodes in segment tree 
        updateValueUtil(0, n - 1, i, diff, 0); 
    } 
      static long modexpo(long x,long n,long m){
        if(n==0)
            return 1;
        else if(n%2==0)
            return (modexpo(((x%m)*(x%m))%m,n/2,m))%m;
        else
            return ((x%m)*((modexpo(((x%m)*(x%m))%m,(n-1)/2,m))%m))%m;
      } 
       static int gcd(int a,int b){
           if(b==0)
              return a;
           else 
              return gcd(b,a%b);
       }
       static long gcd(long a,long b){
           if(b==0)
              return a;
           else 
              return gcd(b,a%b);
       }
	 static class FastReader{
          BufferedReader in;
          StringTokenizer st;
          public FastReader(){
              in=new BufferedReader(new InputStreamReader(System.in));
          }
          String next(){
              while(st==null || !st.hasMoreElements()){
                  try{
                      st=new StringTokenizer(in.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 str19 = "";
            try{
                str19 = in.readLine();
            }
            catch (IOException e){
                e.printStackTrace();
             }
            return str19;
        }
      }    
}
