import java.util.Scanner;
public class Main{
private static Scanner cin;
public static int STOOL_HEIGHT = 30;
public static void main(String args[])throws Exception {
cin = new Scanner(System.in);
int[] x = new int[10];
int tmp= 0;
for(int i=0; i<10;i++) {
tmp = cin.nextInt();
if(tmp >=100 && tmp <=200) {
x[i] = tmp;
}else {
x[i] = 0;
}
}
int height = cin.nextInt();
int totalHeight = height + STOOL_HEIGHT;
int ret = 0;
if (height >= 100 && height <= 120) {
for(int i=0; i<10;i++) {
if(totalHeight >= x[i] && 0 !=x[i]) {
ret++;
}
}
}
System.out.println(ret);
}
}