import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
//题目中已经指明了树上刚好十个苹果
int[] arr = new int[10];
for(int i = 0;i < 10;i++){
arr[i] = scanner.nextInt();
}
int height = scanner.nextInt();
int res = 0;
for(int i = 0 ;i < 10;i++){
if(arr[i] <= height + 30){
res++;
}
}
System.out.println(res);
}
}