#include<iostream>
using namespace std;
int main()
{
int a[10], n, y = 0;
for(int i = 0;i <10;i++ )
{
cin >> a[i];
}
cin >> n;
for(int i=0;i<10;i++)
{
if(a[i] <= n+30 )y++;
}
cout << y << endl;
return 0;
}