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