#include <bits/stdc++.h>
using namespace std;
int main() {
  long a, b, c, d, sum = 0, i, j;
  cin >> a >> b >> c;
  long long n;
  cin >> n;
  vector<long long> f1(n);
  for (i = 0; i < n; i++) {
    cin >> f1[i];
    if (f1[i] < c && f1[i] > b) sum++;
  }
  cout << sum;
}
