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.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class C1216201801 {

  private static void solve(final Input input, final PrintWriter output) throws IOException {
    int n = input.nextInt();
    if (n <= 2) {
      output.println(n);
    } else {
      output.println(1);
    }
  }

  public static void main(String[] args) throws IOException {
    try (final PrintWriter output = new PrintWriter(System.out);
        final Input input = new Input(new BufferedReader(new InputStreamReader(System.in)))) {
      solve(input, output);
    }
  }

  private static class Input implements Closeable {

    private final BufferedReader bufferedReader;
    private final StringBuilder stringBuilder = new StringBuilder();
    private final static char[] SEPERATOR = { '\t', '\n', '\r', ' ' };

    public Input(final BufferedReader in) {
      this.bufferedReader = in;
    }

    private boolean isAnySeperator(final char ch) {
      return ch == SEPERATOR[3] || ch == SEPERATOR[1] || ch == SEPERATOR[0] || ch == SEPERATOR[2];
    }

    private boolean isLineSeperator(final char ch) {
      return ch == SEPERATOR[1] || ch == SEPERATOR[2];
    }

    public String next() throws IOException {
      stringBuilder.setLength(0);
      while (true) {
        int c = bufferedReader.read();
        if (c == -1) {
          return null;
        }
        char ch = (char) c;
        if (!isAnySeperator(ch)) {
          stringBuilder.append(ch);
          break;
        }
      }
      while (true) {
        int c = bufferedReader.read();
        char ch = (char) c;
        if (c == -1 || isAnySeperator(ch)) {
          break;
        }
        stringBuilder.append(ch);
      }
      return stringBuilder.toString();
    }

    public String nextLine() throws IOException {
      stringBuilder.setLength(0);
      while (true) {
        final int c = bufferedReader.read();
        if (c == -1) {
          return null;
        }
        final char ch = (char) c;
        if (!isLineSeperator(ch)) {
          stringBuilder.append(ch);
          break;
        }
      }
      while (true) {
        int c = bufferedReader.read();
        char ch = (char) c;
        if (c == -1 || isLineSeperator(ch)) {
          break;
        }
        stringBuilder.append(ch);
      }
      return stringBuilder.toString();
    }

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

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

    @Override
    public void close() throws IOException {
      bufferedReader.close();
    }
  }
}