arr=[] for i in map(int,input().split()): arr.append(i) a=int(input()) count=0 for i in arr : if i<=a+30: count+=1 print(count)