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