a = list(map(int, input().split())) t = int(input()) numPicked = 0 t += 30 for i in range(len(a)): if (t >= a[i]): numPicked += 1 print(numPicked)