#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  n /= 1000;
  int ret = 1;
  if (n == 6 || n == 11)
    ret = 3;
  else if (n == 8 || n == 9)
    ret = 2;
  cout << ret << "\n";
  return 0;
}
