import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String[] str = stdR.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int M = Integer.parseInt(str[1]);
        int C = Integer.parseInt(str[2]);
        str = stdR.readLine().split(" ");
        int[] B = new int[M];
        for(int i = 0 ; i < M ; i++) {
            B[i] = Integer.parseInt(str[i]);
        }
        int[][] A = new int[N][M];
        for(int i = 0 ; i < N ; i++) {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        }
        int count = 0;
        for(int i = 0 ; i < N ; i++) {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        }
        System.out.println(count);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String[] str = stdR.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int M = Integer.parseInt(str[1]);
        int C = Integer.parseInt(str[2]);
        str = stdR.readLine().split(" ");
        int[] B = new int[M];
        for(int i = 0 ; i < M ; i++) {
            B[i] = Integer.parseInt(str[i]);
        }
        int[][] A = new int[N][M];
        for(int i = 0 ; i < N ; i++) {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        }
        int count = 0;
        for(int i = 0 ; i < N ; i++) {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        }
        System.out.println(count);
    }
} Main public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String[] str = stdR.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int M = Integer.parseInt(str[1]);
        int C = Integer.parseInt(str[2]);
        str = stdR.readLine().split(" ");
        int[] B = new int[M];
        for(int i = 0 ; i < M ; i++) {
            B[i] = Integer.parseInt(str[i]);
        }
        int[][] A = new int[N][M];
        for(int i = 0 ; i < N ; i++) {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        }
        int count = 0;
        for(int i = 0 ; i < N ; i++) {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        }
        System.out.println(count);
    } main {
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String[] str = stdR.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int M = Integer.parseInt(str[1]);
        int C = Integer.parseInt(str[2]);
        str = stdR.readLine().split(" ");
        int[] B = new int[M];
        for(int i = 0 ; i < M ; i++) {
            B[i] = Integer.parseInt(str[i]);
        }
        int[][] A = new int[N][M];
        for(int i = 0 ; i < N ; i++) {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        }
        int count = 0;
        for(int i = 0 ; i < N ; i++) {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        }
        System.out.println(count);
    } BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in)); stdR new BufferedReader(new InputStreamReader(System.in)) String[] str = stdR.readLine().split(" "); str stdR.readLine().split(" ") stdR.readLine().split stdR.readLine() stdR.readLine stdR " " int N = Integer.parseInt(str[0]); N Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int M = Integer.parseInt(str[1]); M Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int C = Integer.parseInt(str[2]); C Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 str = stdR.readLine().split(" ") str stdR.readLine().split(" ") stdR.readLine().split stdR.readLine() stdR.readLine stdR " " int[] B = new int[M]; B new int[M] M for(int i = 0 ; i < M ; i++) {
            B[i] = Integer.parseInt(str[i]);
        } int i = 0 ; int i = 0 ; i 0 i < M i M i++ i++ i {
            B[i] = Integer.parseInt(str[i]);
        } {
            B[i] = Integer.parseInt(str[i]);
        } B[i] = Integer.parseInt(str[i]) B[i] B i Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i int[][] A = new int[N][M]; A new int[N][M] N M for(int i = 0 ; i < N ; i++) {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        } {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        } str = stdR.readLine().split(" ") str stdR.readLine().split(" ") stdR.readLine().split stdR.readLine() stdR.readLine stdR " " for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            } int j = 0 ; int j = 0 ; j 0 j < M j M j++ j++ j {
                A[i][j] = Integer.parseInt(str[j]);
            } {
                A[i][j] = Integer.parseInt(str[j]);
            } A[i][j] = Integer.parseInt(str[j]) A[i][j] A[i] A i j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j int count = 0; count 0 for(int i = 0 ; i < N ; i++) {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        } {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        } int num = 0; num 0 for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            } int j = 0 ; int j = 0 ; j 0 j < M j M j++ j++ j {
                num += A[i][j] * B[j];
            } {
                num += A[i][j] * B[j];
            } num += A[i][j] * B[j] num A[i][j] * B[j] A[i][j] A[i] A i j B[j] B j num += C num C if(num > 0)count++; num > 0 num 0 count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String[] str = stdR.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int M = Integer.parseInt(str[1]);
        int C = Integer.parseInt(str[2]);
        str = stdR.readLine().split(" ");
        int[] B = new int[M];
        for(int i = 0 ; i < M ; i++) {
            B[i] = Integer.parseInt(str[i]);
        }
        int[][] A = new int[N][M];
        for(int i = 0 ; i < N ; i++) {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        }
        int count = 0;
        for(int i = 0 ; i < N ; i++) {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String[] str = stdR.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int M = Integer.parseInt(str[1]);
        int C = Integer.parseInt(str[2]);
        str = stdR.readLine().split(" ");
        int[] B = new int[M];
        for(int i = 0 ; i < M ; i++) {
            B[i] = Integer.parseInt(str[i]);
        }
        int[][] A = new int[N][M];
        for(int i = 0 ; i < N ; i++) {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        }
        int count = 0;
        for(int i = 0 ; i < N ; i++) {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        }
        System.out.println(count);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String[] str = stdR.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int M = Integer.parseInt(str[1]);
        int C = Integer.parseInt(str[2]);
        str = stdR.readLine().split(" ");
        int[] B = new int[M];
        for(int i = 0 ; i < M ; i++) {
            B[i] = Integer.parseInt(str[i]);
        }
        int[][] A = new int[N][M];
        for(int i = 0 ; i < N ; i++) {
            str = stdR.readLine().split(" ");
            for(int j = 0 ; j < M ; j++) {
                A[i][j] = Integer.parseInt(str[j]);
            }
        }
        int count = 0;
        for(int i = 0 ; i < N ; i++) {
            int num = 0;
            for(int j = 0 ; j < M ; j++) {
                num += A[i][j] * B[j];
            }
            num += C;
            if(num > 0)count++;
        }
        System.out.println(count);
    }
}
