#include <iostream>
using namespace std;
int main()
{
int a, b, n, v[1001], cnt = 0;
cin >> n;
for (int i = 1; i <= n; ++i)
{
cin >> v[i];
}
cin >> a >> b;
for (int i = 1; i <= n; ++i)
{
if (v[i] >= a && v[i] <= b)
{
cnt++;
}
}
cout << cnt;
return 0;
}