import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        int B[] = new int[M];
        for(int i=0; i<M; i++) {
            B[i] = sc.nextInt();
        }
        int A[][] = new int[N][M];
        for(int s=0; s<N; s++) {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        }
        int r = 0;
        for(int s=0; s<N; s++) {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        }
        System.out.println(r);
   }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        int B[] = new int[M];
        for(int i=0; i<M; i++) {
            B[i] = sc.nextInt();
        }
        int A[][] = new int[N][M];
        for(int s=0; s<N; s++) {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        }
        int r = 0;
        for(int s=0; s<N; s++) {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        }
        System.out.println(r);
   }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        int B[] = new int[M];
        for(int i=0; i<M; i++) {
            B[i] = sc.nextInt();
        }
        int A[][] = new int[N][M];
        for(int s=0; s<N; s++) {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        }
        int r = 0;
        for(int s=0; s<N; s++) {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        }
        System.out.println(r);
   } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        int B[] = new int[M];
        for(int i=0; i<M; i++) {
            B[i] = sc.nextInt();
        }
        int A[][] = new int[N][M];
        for(int s=0; s<N; s++) {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        }
        int r = 0;
        for(int s=0; s<N; s++) {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        }
        System.out.println(r);
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int B[] = new int[M]; B new int[M] M for(int i=0; i<M; i++) {
            B[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<M i M i++ i++ i {
            B[i] = sc.nextInt();
        } {
            B[i] = sc.nextInt();
        } B[i] = sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc int A[][] = new int[N][M]; A new int[N][M] N M for(int s=0; s<N; s++) {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        } int s=0; int s=0; s 0 s<N s N s++ s++ s {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        } {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        } for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            } int i=0; int i=0; i 0 i<M i M i++ i++ i {
                A[s][i] = sc.nextInt();
            } {
                A[s][i] = sc.nextInt();
            } A[s][i] = sc.nextInt() A[s][i] A[s] A s i sc.nextInt() sc.nextInt sc int r = 0; r 0 for(int s=0; s<N; s++) {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        } int s=0; int s=0; s 0 s<N s N s++ s++ s {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        } {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        } int score = C; score C for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            } int i=0; int i=0; i 0 i<M i M i++ i++ i {
                score += B[i] * A[s][i];
            } {
                score += B[i] * A[s][i];
            } score += B[i] * A[s][i] score B[i] * A[s][i] B[i] B i A[s][i] A[s] A s i if(score>0) r++; score>0 score 0 r++ r System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        int B[] = new int[M];
        for(int i=0; i<M; i++) {
            B[i] = sc.nextInt();
        }
        int A[][] = new int[N][M];
        for(int s=0; s<N; s++) {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        }
        int r = 0;
        for(int s=0; s<N; s++) {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        }
        System.out.println(r);
   }
} public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        int B[] = new int[M];
        for(int i=0; i<M; i++) {
            B[i] = sc.nextInt();
        }
        int A[][] = new int[N][M];
        for(int s=0; s<N; s++) {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        }
        int r = 0;
        for(int s=0; s<N; s++) {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        }
        System.out.println(r);
   }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        int B[] = new int[M];
        for(int i=0; i<M; i++) {
            B[i] = sc.nextInt();
        }
        int A[][] = new int[N][M];
        for(int s=0; s<N; s++) {
            for(int i=0; i<M; i++) {
                A[s][i] = sc.nextInt();
            }
        }
        int r = 0;
        for(int s=0; s<N; s++) {
            int score = C;
            for(int i=0; i<M; i++) {
                score += B[i] * A[s][i];
            }
            if(score>0) r++;
        }
        System.out.println(r);
   }
}