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