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.
#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int oo = (int)1e9;
const long long OO = (long long)1e18;
const double PI = acos(-1.0);
const int N = (int)1e5 + 9;
bool isprime(long long n) {
  if (n <= 1) return 0;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return 1;
}
long long intlog(long long base, long long x) { return (log(x) / log(base)); }
bool prime[N];
void primee() {
  for (int p = 2; p * p <= N; p++) {
    if (prime[p] == true) {
      for (int i = p * 2; i < N; i += p) prime[i] = false;
    }
  }
}
string decToBinary(long long n) {
  string z = "";
  int i = 0;
  while (n > 0) {
    z += (n % 2) + 48;
    n = n / 2;
    i++;
  }
  reverse(((z).begin()), ((z).end()));
  return z;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long power(long long x, int y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
int main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", n == 2 ? 2 : 1);
  return 0;
}
