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.*;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////                                                                                            /////////
////////                                                                                            /////////
////////   MMMM          MMMM    AAAAAAAAAAAAAAAAA  RRRRRRRRRR       EEEEEEEEEEEEE  DDDDDDDDD       /////////
////////   MMMMMM      MMMMMM    AAAAAAAAAAAAAAAAA  RRRR     RRR     EEEEEEEEEEEEE  DDD     DDD     /////////
////////   MMMM MMM  MMM MMMM    AAAA         AAAA  RRRR      RRR    EEEEE          DDD      DDD    /////////
////////   MMMM  MMMMM   MMMM    AAAA         AAAA  RRRR       RRR   EEEEE          DDD       DDD   /////////
////////   MMMM          MMMM    AAAA         AAAA  RRRR      RRR    EEEEE          DDD        DDD  /////////
////////   MMMM          MMMM    AAAA         AAAA  RRRR     RRR     EEEEEEEEEEE    DDD         DDD /////////
////////   MMMM          MMMM    AAAAAAAAAAAAAAAAA  RRRRRRRRRR       EEEEEEEEEEE    DDD         DDD /////////
////////   MMMM          MMMM    AAAAAAAAAAAAAAAAA  RRRR    RRR      EEEEE          DDD        DDD  /////////
////////   MMMM          MMMM    AAAA         AAAA  RRRR     RRR     EEEEE          DDD      DDD    /////////
////////   MMMM          MMMM    AAAA         AAAA  RRRR      RRR    EEEEEEEEEEEEE  DDD    DDD      /////////
////////   MMMM          MMMM    AAAA         AAAA  RRRR       RRR   EEEEEEEEEEEEE  DDDDDDDDD       /////////
////////                                                                                            /////////
////////                                                                                            /////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////

public class DefiniteGame {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int x = sc.nextInt();
        if(x!=2){out.println(1);}
        else out.println(2);
        out.flush();

    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream system) {
            br = new BufferedReader(new InputStreamReader(system));
        }

        public Scanner(String file) throws Exception {
            br = new BufferedReader(new FileReader(file));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

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

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public char nextChar() throws IOException {
            return next().charAt(0);
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

        public void waitForInput() throws InterruptedException {
            Thread.sleep(3000);
        }
    }
}