//丹阳新区实小路彦
include [HTML_REMOVED]
using namespace std;
int k, a[10001], s, ans;
int main()
{
for (int i = 1; i <= 10; i)
cin >> a[i];
cin >> k;
s = k + 30;
for (int i = 1; i <= 10; i)
if (s >= a[i]) ans++;
cout << ans << endl;
return 0;
}