#include <bits/stdc++.h>
using namespace std;
const bool DEBUG = 0;
int to[100100][2];
int dp[100100][2];
int x[100100];
int y[100100];
int n, m;
int tmp;
int main() {
  scanf("%d %d %d %d", &n, &m, &tmp, &tmp);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &y[i]);
  }
  if (m == 0) {
    printf("%d\n", n);
    return 0;
  }
  memset(to, -1, sizeof to);
  int j = 0;
  for (int i = 0; i < n; i++) {
    while (j + 1 < m && abs(y[j + 1] - x[i]) < abs(y[j] - x[i])) j++;
    if (j == m - 1) {
      to[i][0] = m - 1;
    } else if (abs(y[j + 1] - x[i]) == abs(y[j] - x[i])) {
      to[i][0] = j;
      to[i][1] = j + 1;
    } else {
      to[i][0] = j;
    }
  }
  dp[0][0] = 0;
  dp[0][1] = (to[0][1] == -1 ? 1 : 0);
  for (int i = 1; i < n; i++) {
    dp[i][0] = dp[i][1] = 100000000;
    if (to[i][1] == -1) {
      if (to[i - 1][1] == to[i][0]) {
        if (abs(y[to[i][0]] - x[i]) == abs(y[to[i][0]] - x[i - 1])) {
          dp[i][0] = min(dp[i - 1][0], dp[i - 1][1]);
        } else if (abs(y[to[i][0]] - x[i]) > abs(y[to[i][0]] - x[i - 1])) {
          dp[i][0] = min(dp[i - 1][0], dp[i - 1][1] + 1);
        } else {
          dp[i][0] = min(dp[i - 1][0], dp[i - 1][1] + 1);
        }
      } else if (to[i - 1][0] == to[i][0]) {
        if (abs(y[to[i][0]] - x[i]) == abs(y[to[i][0]] - x[i - 1])) {
          dp[i][0] = dp[i - 1][0];
        } else {
          dp[i][0] = dp[i - 1][0] + 1;
        }
      } else {
        dp[i][0] = min(dp[i - 1][0], dp[i - 1][1]);
      }
    } else {
      if (to[i - 1][0] == to[i][0]) {
        if (abs(y[to[i][0]] - x[i]) == abs(y[to[i][0]] - x[i - 1])) {
          dp[i][0] = dp[i - 1][0];
        } else if (abs(y[to[i][0]] - x[i]) > abs(y[to[i][0]] - x[i - 1])) {
          dp[i][0] = dp[i - 1][0] + 1;
        } else {
          dp[i][0] = dp[i - 1][0] + 1;
        }
      } else if (to[i - 1][1] == to[i][0]) {
        if (abs(y[to[i][0]] - x[i]) == abs(y[to[i][0]] - x[i - 1])) {
          dp[i][0] = min(dp[i - 1][0], dp[i - 1][1]);
        } else if (abs(y[to[i][0]] - x[i]) > abs(y[to[i][0]] - x[i - 1])) {
          dp[i][0] = min(dp[i - 1][0], dp[i - 1][1] + 1);
        } else {
          dp[i][0] = min(dp[i - 1][0], dp[i - 1][1] + 1);
        }
      } else {
        dp[i][0] = min(dp[i - 1][0], dp[i - 1][1]);
      }
      dp[i][1] = min(dp[i - 1][0], dp[i - 1][1]);
    }
  }
  printf("%d\n", min(dp[n - 1][0], dp[n - 1][1]));
}
