#include <bits/stdc++.h>
using namespace std;
int dis(int A, int B) { return abs(A - B); }
int bt[100005];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  ;
  int Y0, Y1;
  scanf("%d %d", &Y0, &Y1);
  ;
  vector<int> v, v2;
  for (int i = 0; i < n; i++) {
    int tmp;
    scanf("%d", &tmp);
    ;
    v.push_back(tmp);
  }
  for (int i = 0; i <= 100000; i++) bt[i] = INT_MAX;
  for (int i = 0; i < m; i++) {
    int tmp;
    scanf("%d", &tmp);
    ;
    v2.push_back(tmp);
  }
  int p1 = 0, p2 = 1;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    while (dis(v2[p1], v[i]) > dis(v2[p2], v[i])) {
      p1++;
      p2++;
    }
    int A, B;
    A = dis(v2[p1], v[i]);
    B = dis(v2[p2], v[i]);
    if (A < B) {
      if (bt[p1] == A || bt[p1] == INT_MAX) {
        bt[p1] = A;
        ans++;
      } else if (A < bt[p1]) {
        bt[p1] = A;
      }
    }
    if (A == B) {
      if (bt[p1] == A) {
        ans++;
      } else if (bt[p1] == INT_MAX) {
        bt[p1] = A;
        ans++;
      } else if (bt[p2] == INT_MAX) {
        bt[p2] = B;
        ans++;
      }
    }
    if (A > B) {
      if (bt[p2] == INT_MAX) {
        bt[p2] = B;
        ans++;
      }
    }
  }
  printf("%d\n", n - ans);
}
