#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e17;
const long long MOD = 1000000007;
const long long MAX = 400000;
int main() {
  int N, M;
  cin >> N >> M;
  int S[3000], T[3000];
  for (int i = 0; i < N; i++) {
    cin >> S[i];
  }
  for (int i = 0; i < M; i++) {
    cin >> T[i];
  }
  cout << N;
  system("PAUSE");
}
