#include <bits/stdc++.h>
long long n;
int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  std::cin >> n;
  n = n / 1000;
  if (n == 6 || n == 11) std::cout << "3\n", exit(0);
  if (n >= 8 && n <= 9) std::cout << "2\n", exit(0);
  std::cout << "1\n";
  return 0;
}
