apples = list(map(int, input().split())) n = int(input()) print(sum(1 for x in apples if x <= n + 30))