#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-6;
const int INF = 1000000000;
const int maxn = 1e5 + 10;
int a, b, c, n, x[maxn];
int main() {
  scanf("%d%d%d", &a, &b, &c);
  scanf("%d", &n);
  int temp;
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    cin >> temp;
    if (temp < c && temp > b) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
