#include <bits/stdc++.h>
using namespace std;
void init() {}
int tonum_int(const string& str) {
  int num;
  stringstream ss(str);
  ss >> num;
  return num;
}
int mice[100001];
int cheese[100001];
list<int> g[100001];
bool visit[200001];
int mini[100001];
bool haveeat[100001];
int com1;
int com2;
vector<int> ee[200001];
bool fa[200001];
void addedge(int x, int y) {
  g[y].push_back(x);
  mini[y] = min(mini[y], abs(cheese[y] - mice[x]));
}
void ae(int a, int b) {
  ee[a].push_back(b);
  ee[b].push_back(a);
}
void dfs(int node) {
  visit[node] = true;
  if (node < 100000) {
    com1++;
  } else {
    com2++;
  }
  for (int i = 0; i < ee[node].size(); ++i) {
    int to = ee[node][i];
    if (!visit[to]) {
      dfs(to);
    }
  }
}
int main() {
  init();
  int n, m, y0, y1;
  cin >> n >> m >> y0 >> y1;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &mice[i]);
  }
  for (int i = 0; i < m; ++i) {
    scanf("%d", &cheese[i]);
    mini[i] = 999999999;
  }
  if (m == 0) {
    cout << n << endl;
    return 0;
  }
  int yind = 0;
  for (int i = 0; i < n; ++i) {
    while (yind < m && cheese[yind] <= mice[i]) {
      yind++;
    }
    if (yind == m) {
      addedge(i, yind - 1);
    } else if (yind == 0) {
      addedge(i, 0);
    } else {
      int adif = abs(cheese[yind] - mice[i]);
      int bdif = abs(cheese[yind - 1] - mice[i]);
      if (adif < bdif) {
        addedge(i, yind);
      } else if (bdif < adif) {
        addedge(i, yind - 1);
      } else {
        addedge(i, yind);
        addedge(i, yind - 1);
      }
    }
  }
  int eat = 0;
  for (int i = 0; i < 100000; ++i) {
    int ct = 0;
    for (list<int>::iterator itr = g[i].begin(); itr != g[i].end(); ++itr) {
      int m = (*itr);
      if (!haveeat[m] && abs(mice[m] - cheese[i]) == mini[i]) {
        ct++;
      }
    }
    if (ct == 2) {
      for (list<int>::iterator itr = g[i].begin(); itr != g[i].end();) {
        int m = (*itr);
        if (!haveeat[m] && abs(mice[m] - cheese[i]) == mini[i]) {
          haveeat[m] = true;
          g[i].erase(itr++);
        } else {
          itr++;
        }
      }
      eat += 2;
      fa[i] = true;
    }
  }
  for (int i = 0; i < 100000; ++i) {
    if (fa[i]) continue;
    for (list<int>::iterator itr = g[i].begin(); itr != g[i].end(); ++itr) {
      int m = (*itr);
      if (!haveeat[m]) {
        ae(i, m + 100000);
      }
    }
  }
  for (int i = 0; i < 200000; ++i) {
    if (!visit[i]) {
      com1 = com2 = 0;
      dfs(i);
      eat += min(com1, com2);
    }
  }
  cout << n - eat << endl;
  return 0;
}
