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;
void input(vector<long long>& v, long n) {
  for (long long i = 0; i < n; i++) {
    long long in;
    cin >> in;
    v.push_back(in);
  }
}
void output(vector<long long> v) {
  for (long long i = 0; i < v.size(); i++) cout << v[i] << " ";
}
long long max_of_three(long long a, long long b, long long c) {
  if (a >= b && a >= c)
    return a;
  else if (b >= a && b >= c)
    return b;
  else
    return c;
}
long long max_of_4(long long a, long long b, long long c, long long d) {
  if (a >= b && a >= c && a >= d)
    return a;
  else if (b >= a && b >= c && b >= d)
    return b;
  else if (c >= a && c >= d && c >= b)
    return c;
  else
    return d;
}
map<long long, long long> frequency(vector<long long> v) {
  map<long long, long long> m;
  for (long long i = 0; i < v.size(); i++) {
    if (m.find(v[i]) != m.end())
      m[v[i]]++;
    else {
      m.insert({v[i], 1});
    }
  }
  return m;
}
long long max_occuring_int(std::map<long long, long long> m) {
  long long max_x = 0;
  long long i = 0, n = m.size();
  std::map<long long, long long>::iterator it = m.begin();
  for (i = 0; i < n; i++) {
    if (it->second > max_x) max_x = it->second;
    it++;
  }
  return max_x;
}
void solve() {
  int a;
  cin >> a;
  if (a == 2 || a == 1)
    cout << a;
  else
    cout << "1";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
