#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long a, b, c, n;
  cin >> a >> b >> c;
  cin >> n;
  long temp, ans = 0;
  for (long i = 0; i < n; i++) {
    cin >> temp;
    if (temp <= b || temp >= c)
      continue;
    else
      ans++;
  }
  cout << ans << endl;
  return 0;
}
