#include <bits/stdc++.h>
using namespace std;
int h, a, b, n, res;
void nhap() {
  cin >> h >> a >> b >> n;
  for (int x, i = 1; i <= n; i++) {
    cin >> x;
    if (x > a && x < b) res++;
  }
}
void solve() { cout << res; }
int main() {
  nhap();
  solve();
  return 0;
}
