2 10 1 1 1
1
10
1
1 5 1 8
 4 4 1 0 1
1

1
1 2 1 4
 2 5 1 0 1
2

1
1 4 1 5
 10 10 1 8 4
10
2 3 4 5 6 7 8 9
10
1 1 3 1
2 1 7 1
1 1 9 1
7 1 4 1
10 1 7 1
2 1 7 1
3 1 2 1
5 1 2 1
10 1 5 1
6 1 9 1
 2 4 1 1 1
1
4
1
1 2 1 3
 2 2 0 1 1

1
1
1 2 2 2
 1000 1000 1 1 10
1
2
1
1 900 1 1000
 5 5 1 1 1
3
2
1
1 5 1 1
 2 4 1 1 1
1
2
1
2 3 2 4
 4 4 1 0 1
4

5
1 1 2 2
1 3 2 2
3 3 4 3
3 2 2 2
1 2 2 3

3
 2
 1
 3
4
4
3
3
4
3
3
4
3
 1
 3
 100
 4
 1
 6
4
3
5
4

#include <bits/stdc++.h>
using namespace std;
int findIndexLessOrEqual(vector<int>& v, int x) {
  if (v.size() == 0 || v[0] > x) return -1;
  int l = 0;
  int r = (int)v.size() - 1;
  while (l < r) {
    int m = (l + r) / 2;
    if (v[m] > x)
      r = m - 1;
    else
      l = m;
  }
  return l;
}
int findIndexGreater(vector<int> v, int x) {
  if (v.size() == 0 || v.back() <= x) return -1;
  int l = 0;
  int r = (int)v.size() - 1;
  while (l < r) {
    int m = (l + r) / 2;
    if (v[m] <= x)
      l = m + 1;
    else
      r = m;
  }
  return l;
}
int min(int a, int b, int c) { return min(min(a, b), c); }
int max(int a, int b, int c) { return max(max(a, b), c); }
int main() {
  vector<int> vt = {2, 5, 6, 8, 10, 12};
  cout << findIndexGreater(vt, 7) << endl;
  return 0;
  int n, m, ce, cl, v;
  cin >> n >> m >> cl >> ce >> v;
  vector<int> e(ce), l(cl);
  for (int i = 0; i < cl; i++) cin >> l[i];
  for (int i = 0; i < ce; i++) cin >> e[i];
  int q;
  cin >> q;
  while (q--) {
    int x1, y1, x2, y2;
    cin >> y1 >> x1 >> y2 >> x2;
    if (y1 == y2) cout << abs(x2 - x1) << endl;
    int res = INT_MAX;
    int sl = findIndexLessOrEqual(l, x1);
    int sr = findIndexGreater(l, x1);
    if (sl != -1)
      res = min(res, abs(l[sl] - x1) + abs(l[sl] - x2) + abs(y1 - y2));
    if (sr != -1)
      res = min(res, abs(l[sr] - x1) + abs(l[sr] - x2) + abs(y1 - y2));
    int el = findIndexLessOrEqual(e, x1);
    int er = findIndexGreater(e, x1);
    if (el != -1)
      res = min(res,
                abs(e[el] - x1) + abs(e[el] - x2) + (abs(y1 - y2) + v - 1) / v);
    if (er != -1)
      res = min(res,
                abs(e[er] - x1) + abs(e[er] - x2) + (abs(y1 - y2) + v - 1) / v);
    cout << res << endl;
  }
  return 0;
}
