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 javafx.util.Pair;
public class Main implements Runnable 
{  
    
    static class Pair implements Comparable <Pair>
    {
        int x,y;        
        Pair(int x,int y)
        {
            this.x=x;
            this.y=y;
        }
        
        public boolean equals(Object obj)
        {
            if(obj==null)
                return false;
            if(obj==this)
                return true;
            if(!(obj instanceof Pair))
                return false;
            Pair o=(Pair) obj;
            return o.x==this.x && o.y==this.y;
        }
        
        public int hashCode()
        {
            return this.x+this.y;
        }
        
        public int compareTo(Pair p)
        {
            if(x==p.x)
                return Integer.compare(y,p.y);
            return Integer.compare(x,p.x);
        }
    }
    
    public static void main(String[] args)
    {
        new Thread(null, new Main(), "rev", 1 << 29).start();
    }

    public void run()
    {
        InputStream inputStream=System.in;
        OutputStream outputStream=System.out;
        InputReader in=new InputReader(inputStream);
        PrintWriter out=new PrintWriter(outputStream);
        Task solver=new Task();
        solver.solve(1,in,out);
        out.close();
    }
    
    static class Task
    { 
        
        void solve(int testNumber, InputReader in, PrintWriter out)
        {
            int n=in.nextInt();
            if(n==2)
                out.println("2");
            else
                out.println(1);
        }
    }

    static class InputReader 
    {
        private InputStream stream;
        private byte[] buf=new byte[8192];
        private int curChar,snumChars;
        private SpaceCharFilter filter;
 
        public InputReader(InputStream stream) 
        {
            this.stream=stream;
        }
 
        public int snext() 
        {
            if(snumChars==-1)
                throw new InputMismatchException();
            if(curChar>=snumChars)
            {
                curChar=0;
                try 
                {
                    snumChars=stream.read(buf);                
                } 
                catch(IOException e) 
                {
                    throw new InputMismatchException();
                }
                if(snumChars<=0)
                    return -1;
            }
            return buf[curChar++];
        }
 
        public int nextInt()
        {
            int c=snext();
            while(isSpaceChar(c))
                c=snext();
            int sgn=1;
            if(c=='-')
            {
                sgn=-1;
                c=snext();
            }
            int res=0;
            do
            {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res*=10;
                res+=c-'0';
                c=snext();
                }while(!isSpaceChar(c));
            return res*sgn;
        }
 
        public long nextLong()
        {
            int c=snext();
            while(isSpaceChar(c))
                c=snext();
            int sgn=1;
            if(c=='-')
            {
                sgn=-1;
                c=snext();
            }
            long res=0;
            do{
                 if (c<'0' || c>'9')
                    throw new InputMismatchException();
                res*=10;
                res+=c-'0';
                c=snext();
            }while (!isSpaceChar(c));
            return res * sgn;
        }
 
        public int[] nextIntArray(int n)
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
                a[i]=nextInt();
            return a;
        }

        public long[] nextLongArray(int n)
        {
            long a[]=new long[n];
            for(int i=1;i<n;i++)
                a[i]=nextLong();
            return a;
        }
        
        public String nextString()
        {
            int c=snext();
            while(isSpaceChar(c))
                c=snext();
            StringBuilder res=new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c=snext();
            }while(!isSpaceChar(c));
            return res.toString();
        }
        
        public boolean isSpaceChar(int c)
        {
            if(filter != null)
                return filter.isSpaceChar(c);
            return c==' ' || c=='\n' || c=='\r' || c=='\t' || c==-1;
        }
 
        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }
}