a=30 s=list(map(int,input().split())) x=int(input()) x+=a asd=0 for i in s: if i<=x: asd+=1 print(asd)