s = input().split()
n = int(input())
l = []
c = 0
for v in s:
l.append(int(v))
for i in range(0, len(l)):
if n + 30 >= l[i]:
c += 1
print(c)
/**************************************************************
Problem: 1388
User: admin
Language: Python
Result: Accepted
Time:92 ms
Memory:34480 kb
****************************************************************/