#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int n ; 
	cin>>n;
	int x ; cin>>x;
	vector<vector<int>>mat(n,vector<int>(n,0));
	for(int i = 0 ; i<n;i++){
		for(int j = 0; j<n;j++){
			cin>>mat[i][j];
		}
	}
	
	int count = 0 ; 
	for(int i = 0 ; i<n;i++){
		for(int j = 0; j<n;j++){
			if(mat[i][j]<=x){
				count++;
			}
		}
	}
	cout<<count;
	return 0;
}