#include <bits/stdc++.h>
using namespace std;
int n, m, k;
const int maxn = 805;
string s[maxn];
int x, y;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  cout << 3 << endl;
  return 0;
}
