#include <bits/stdc++.h>
using namespace std;
const long long int N = 600;
const double INF = 100000000;
double power(double x, long long int n) {
  double r = 1.0;
  while (n > 0) {
    if (n % 2 != 0) r *= x;
    x *= x;
    n /= 2;
  }
  return r;
}
long long int n;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  long long int t = (n / 2 + n % 2) * (n / 2 + n % 2) + (n / 2) * (n / 2);
  (t % 2 != 0) ? cout << 1 : cout << 2;
}
