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