#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int a[10],h,s=0;
for(int i=0;i<10;i++) //0~9
cin>>a[i];
cin>>h;
for(int i=0;i<10;i++)
{
if(a[i]<=h+30)
s++;
}
cout<<s<<endl;
return 0;
}