#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, n, i, j, money;
  cin >> a >> b >> c;
  cin >> n;
  int m[n];
  money = 0;
  for (i = 0; i < n; i++) {
    cin >> m[i];
    if (m[i] > b && m[i] < c) money = money + 1;
  }
  if (a > b && a < c)
    cout << money;
  else
    cout << 0;
  return 0;
}
