import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int c = scan.nextInt();

        int[] list = new int[m];
        int[][] map = new int[n][m];

        for(int i = 0; i < m; i++) {
        	list[i] = scan.nextInt();
        }

        for(int i = 0; i < n; i++) {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        }

        int ans = 0;
        for(int i = 0; i < n; i++) {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int c = scan.nextInt();

        int[] list = new int[m];
        int[][] map = new int[n][m];

        for(int i = 0; i < m; i++) {
        	list[i] = scan.nextInt();
        }

        for(int i = 0; i < n; i++) {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        }

        int ans = 0;
        for(int i = 0; i < n; i++) {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int c = scan.nextInt();

        int[] list = new int[m];
        int[][] map = new int[n][m];

        for(int i = 0; i < m; i++) {
        	list[i] = scan.nextInt();
        }

        for(int i = 0; i < n; i++) {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        }

        int ans = 0;
        for(int i = 0; i < n; i++) {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        }
        System.out.println(ans);
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int c = scan.nextInt();

        int[] list = new int[m];
        int[][] map = new int[n][m];

        for(int i = 0; i < m; i++) {
        	list[i] = scan.nextInt();
        }

        for(int i = 0; i < n; i++) {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        }

        int ans = 0;
        for(int i = 0; i < n; i++) {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        }
        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan int[] list = new int[m]; list new int[m] m int[][] map = new int[n][m]; map new int[n][m] n m for(int i = 0; i < m; i++) {
        	list[i] = scan.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        	list[i] = scan.nextInt();
        } {
        	list[i] = scan.nextInt();
        } list[i] = scan.nextInt() list[i] list i scan.nextInt() scan.nextInt scan for(int i = 0; i < n; i++) {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        } {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        } for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        		map[i][j] = scan.nextInt();
        	} {
        		map[i][j] = scan.nextInt();
        	} map[i][j] = scan.nextInt() map[i][j] map[i] map i j scan.nextInt() scan.nextInt scan int ans = 0; ans 0 for(int i = 0; i < n; i++) {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        } {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        } int sum = 0; sum 0 for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        		sum += map[i][j] * list[j];
        	} {
        		sum += map[i][j] * list[j];
        	} sum += map[i][j] * list[j] sum map[i][j] * list[j] map[i][j] map[i] map i j list[j] list j if(sum + c > 0)
        		ans++; sum + c > 0 sum + c sum c 0 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int c = scan.nextInt();

        int[] list = new int[m];
        int[][] map = new int[n][m];

        for(int i = 0; i < m; i++) {
        	list[i] = scan.nextInt();
        }

        for(int i = 0; i < n; i++) {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        }

        int ans = 0;
        for(int i = 0; i < n; i++) {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int c = scan.nextInt();

        int[] list = new int[m];
        int[][] map = new int[n][m];

        for(int i = 0; i < m; i++) {
        	list[i] = scan.nextInt();
        }

        for(int i = 0; i < n; i++) {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        }

        int ans = 0;
        for(int i = 0; i < n; i++) {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int c = scan.nextInt();

        int[] list = new int[m];
        int[][] map = new int[n][m];

        for(int i = 0; i < m; i++) {
        	list[i] = scan.nextInt();
        }

        for(int i = 0; i < n; i++) {
        	for(int j = 0; j < m; j++) {
        		map[i][j] = scan.nextInt();
        	}
        }

        int ans = 0;
        for(int i = 0; i < n; i++) {
        	int sum = 0;
        	for(int j = 0; j < m; j++) {
        		sum += map[i][j] * list[j];
        	}
        	if(sum + c > 0)
        		ans++;
        }
        System.out.println(ans);
    }
}