#include <bits/stdc++.h>
using namespace std;
long long N, M, K, a, b, c, d, e, H, W, L;
int A[200005] = {};
int B[200005] = {};
int kosuu[2][2001][100001] = {};
bool f, ff;
string S[2];
set<long long> sll;
pair<long long, long long> bufpl;
vector<long long> vl[3];
vector<pair<long long, long long> > vpl;
vector<string> vs;
set<long long> llset;
long long modinv(long long aa, long long mm) {
  long long bb = mm, uu = 1, vv = 0;
  while (bb) {
    long long tt = aa / bb;
    aa -= tt * bb;
    swap(aa, bb);
    uu -= tt * vv;
    swap(uu, vv);
  }
  uu %= mm;
  if (uu < 0) uu += mm;
  return uu;
}
long long minn, maxx;
double ansa;
int main() {
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < M; i++) {
    cin >> B[i];
  }
  cout << e << endl;
  return 0;
}
