#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAXN = 2e5;
long long v[MAXN];
int p[MAXN];
int main() {
  ios::sync_with_stdio(0);
  int d, a, b;
  cin >> d >> a >> b;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v, v + n);
  int A = upper_bound(v, v + n, a) - v;
  int B = lower_bound(v, v + n, b) - v;
  B--;
  cout << B - A + 1 << endl;
  return 0;
}
