排序
#include<iostream>
#include<algorithm>
using namespace std;
const int N = 10;
int h[N];
int main () {
int height,ans = 0;
for (int i = 0;i < N;i++) cin >> h[i];
cin >> height;
sort(h,h + N);
for (int i = 0;i < N;i++) {
if (height + 30 >= h[i]) ans++;
else break;
}
cout << ans << endl;
return 0;
}