import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int d = 0;
int b[] = new int[10];
for (int i = 0; i <= 9; i++) {
int a = sc.nextInt();
b[i] = a;
}
int c = sc.nextInt();
for(int i = 0 ; i<=9;i++) {
if(b[i]<=c+30) {
d++;
}
}System.out.println(d);
}
}