// https://www.luogu.com.cn/problem/P1046
#include <iostream>
using namespace std;
int main()
{
int a[10], i, b, r = 0;
for (i = 0; i < 10; i++)
{
cin >> a[i];
}
cin >> b;
b += 30;
for (i = 0; i < 10; i++)
{
if (b >= a[i])
r++;
}
cout << r;
return 0;
}