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