import java.util.*;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.run();
    }
    
    int n;
    int m;
    int c;
    int[] b;
    int[][] a;
    int ans;
    

    public void run() {
        // 入力情報取得
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        m = sc.nextInt();
        c = sc.nextInt();
        b = new int[m];
        a = new int[n][m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        }
        sc.close();

        // 解答処理
        solve();
    }
    
    private void solve() {
        ans = 0;
        check();
        System.out.println(ans);
    }

    private void check() {
        for(int i = 0;i<n;i++) {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.run();
    }
    
    int n;
    int m;
    int c;
    int[] b;
    int[][] a;
    int ans;
    

    public void run() {
        // 入力情報取得
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        m = sc.nextInt();
        c = sc.nextInt();
        b = new int[m];
        a = new int[n][m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        }
        sc.close();

        // 解答処理
        solve();
    }
    
    private void solve() {
        ans = 0;
        check();
        System.out.println(ans);
    }

    private void check() {
        for(int i = 0;i<n;i++) {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        }
    }
} Main int n; n int m; m int c; c int[] b; b int[][] a; a int ans; ans public static void main(String[] args) {
        Main main = new Main();
        main.run();
    } main {
        Main main = new Main();
        main.run();
    } Main main = new Main(); main new Main() main.run() main.run main String[] args args public void run() {
        // 入力情報取得
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        m = sc.nextInt();
        c = sc.nextInt();
        b = new int[m];
        a = new int[n][m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        }
        sc.close();

        // 解答処理
        solve();
    } run {
        // 入力情報取得
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        m = sc.nextInt();
        c = sc.nextInt();
        b = new int[m];
        a = new int[n][m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        }
        sc.close();

        // 解答処理
        solve();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc m = sc.nextInt() m sc.nextInt() sc.nextInt sc c = sc.nextInt() c sc.nextInt() sc.nextInt sc b = new int[m] b new int[m] m a = new int[n][m] a new int[n][m] n 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 for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        } {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        } for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                a[i][j] = sc.nextInt();                
            } {
                a[i][j] = sc.nextInt();                
            } a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc sc.close() sc.close sc solve() solve private void solve() {
        ans = 0;
        check();
        System.out.println(ans);
    } solve {
        ans = 0;
        check();
        System.out.println(ans);
    } ans = 0 ans 0 check() check System.out.println(ans) System.out.println System.out System System.out ans private void check() {
        for(int i = 0;i<n;i++) {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        }
    } check {
        for(int i = 0;i<n;i++) {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        }
    } for(int i = 0;i<n;i++) {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        } {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        } int score = 0; score 0 for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                score += a[i][j] * b[j];
            } {
                score += a[i][j] * b[j];
            } score += a[i][j] * b[j] score a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j if (score + c > 0) {
                ans++;                
            } score + c > 0 score + c score c 0 {
                ans++;                
            } ans++ ans public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.run();
    }
    
    int n;
    int m;
    int c;
    int[] b;
    int[][] a;
    int ans;
    

    public void run() {
        // 入力情報取得
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        m = sc.nextInt();
        c = sc.nextInt();
        b = new int[m];
        a = new int[n][m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        }
        sc.close();

        // 解答処理
        solve();
    }
    
    private void solve() {
        ans = 0;
        check();
        System.out.println(ans);
    }

    private void check() {
        for(int i = 0;i<n;i++) {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.run();
    }
    
    int n;
    int m;
    int c;
    int[] b;
    int[][] a;
    int ans;
    

    public void run() {
        // 入力情報取得
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        m = sc.nextInt();
        c = sc.nextInt();
        b = new int[m];
        a = new int[n][m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        }
        sc.close();

        // 解答処理
        solve();
    }
    
    private void solve() {
        ans = 0;
        check();
        System.out.println(ans);
    }

    private void check() {
        for(int i = 0;i<n;i++) {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.run();
    }
    
    int n;
    int m;
    int c;
    int[] b;
    int[][] a;
    int ans;
    

    public void run() {
        // 入力情報取得
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        m = sc.nextInt();
        c = sc.nextInt();
        b = new int[m];
        a = new int[n][m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();                
            }
        }
        sc.close();

        // 解答処理
        solve();
    }
    
    private void solve() {
        ans = 0;
        check();
        System.out.println(ans);
    }

    private void check() {
        for(int i = 0;i<n;i++) {
            int score = 0;
            for (int j = 0; j < m; j++) {
                score += a[i][j] * b[j];
            }
            if (score + c > 0) {
                ans++;                
            }
        }
    }
}