import java.util.*;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Collections;
import java.awt.Point;


public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nmc = br.readLine().split(" ");
        int n = Integer.parseInt(nmc[0]);
        int m = Integer.parseInt(nmc[1]);
        int c = Integer.parseInt(nmc[2]);
        String[] sbs = br.readLine().split(" ");
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = Integer.parseInt(sbs[i]);
        }
        
        int count = 0;
        for (int i = 0; i < n; i++) {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        }
        
        
        System.out.println(count);
    }
}
 import java.util.*; util.* java import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.ArrayDeque; ArrayDeque java.util import java.util.Deque; Deque java.util import java.util.Collections; Collections java.util import java.awt.Point; Point java.awt public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nmc = br.readLine().split(" ");
        int n = Integer.parseInt(nmc[0]);
        int m = Integer.parseInt(nmc[1]);
        int c = Integer.parseInt(nmc[2]);
        String[] sbs = br.readLine().split(" ");
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = Integer.parseInt(sbs[i]);
        }
        
        int count = 0;
        for (int i = 0; i < n; i++) {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        }
        
        
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nmc = br.readLine().split(" ");
        int n = Integer.parseInt(nmc[0]);
        int m = Integer.parseInt(nmc[1]);
        int c = Integer.parseInt(nmc[2]);
        String[] sbs = br.readLine().split(" ");
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = Integer.parseInt(sbs[i]);
        }
        
        int count = 0;
        for (int i = 0; i < n; i++) {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        }
        
        
        System.out.println(count);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nmc = br.readLine().split(" ");
        int n = Integer.parseInt(nmc[0]);
        int m = Integer.parseInt(nmc[1]);
        int c = Integer.parseInt(nmc[2]);
        String[] sbs = br.readLine().split(" ");
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = Integer.parseInt(sbs[i]);
        }
        
        int count = 0;
        for (int i = 0; i < n; i++) {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        }
        
        
        System.out.println(count);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] nmc = br.readLine().split(" "); nmc br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(nmc[0]); n Integer.parseInt(nmc[0]) Integer.parseInt Integer nmc[0] nmc 0 int m = Integer.parseInt(nmc[1]); m Integer.parseInt(nmc[1]) Integer.parseInt Integer nmc[1] nmc 1 int c = Integer.parseInt(nmc[2]); c Integer.parseInt(nmc[2]) Integer.parseInt Integer nmc[2] nmc 2 String[] sbs = br.readLine().split(" "); sbs br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] bs = new int[m]; bs new int[m] m for (int i = 0; i < m; i++) {
            bs[i] = Integer.parseInt(sbs[i]);
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            bs[i] = Integer.parseInt(sbs[i]);
        } {
            bs[i] = Integer.parseInt(sbs[i]);
        } bs[i] = Integer.parseInt(sbs[i]) bs[i] bs i Integer.parseInt(sbs[i]) Integer.parseInt Integer sbs[i] sbs i int count = 0; count 0 for (int i = 0; i < n; i++) {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        } {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        } String[] sas = br.readLine().split(" "); sas br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] as = new int[m]; as new int[m] m for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            } int k = 0; int k = 0; k 0 k < m k m k++ k++ k {
                as[k] = Integer.parseInt(sas[k]);
            } {
                as[k] = Integer.parseInt(sas[k]);
            } as[k] = Integer.parseInt(sas[k]) as[k] as k Integer.parseInt(sas[k]) Integer.parseInt Integer sas[k] sas k int sum = 0; sum 0 for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                sum += as[j]*bs[j];
            } {
                sum += as[j]*bs[j];
            } sum += as[j]*bs[j] sum as[j]*bs[j] as[j] as j bs[j] bs j sum += c sum c if (sum>0) count++; sum>0 sum 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 br = new BufferedReader(new InputStreamReader(System.in));
        String[] nmc = br.readLine().split(" ");
        int n = Integer.parseInt(nmc[0]);
        int m = Integer.parseInt(nmc[1]);
        int c = Integer.parseInt(nmc[2]);
        String[] sbs = br.readLine().split(" ");
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = Integer.parseInt(sbs[i]);
        }
        
        int count = 0;
        for (int i = 0; i < n; i++) {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        }
        
        
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nmc = br.readLine().split(" ");
        int n = Integer.parseInt(nmc[0]);
        int m = Integer.parseInt(nmc[1]);
        int c = Integer.parseInt(nmc[2]);
        String[] sbs = br.readLine().split(" ");
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = Integer.parseInt(sbs[i]);
        }
        
        int count = 0;
        for (int i = 0; i < n; i++) {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        }
        
        
        System.out.println(count);
    }
} Main
import java.util.*;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Collections;
import java.awt.Point;


public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nmc = br.readLine().split(" ");
        int n = Integer.parseInt(nmc[0]);
        int m = Integer.parseInt(nmc[1]);
        int c = Integer.parseInt(nmc[2]);
        String[] sbs = br.readLine().split(" ");
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = Integer.parseInt(sbs[i]);
        }
        
        int count = 0;
        for (int i = 0; i < n; i++) {
            String[] sas = br.readLine().split(" ");
            int[] as = new int[m];
            for (int k = 0; k < m; k++) {
                as[k] = Integer.parseInt(sas[k]);
            }
        
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += as[j]*bs[j];
            }
            sum += c;
            if (sum>0) count++;
        }
        
        
        System.out.println(count);
    }
}

