#include
using namespace std;
const int N=6002;
int A[N][N],B[N][N];
int main()
{
int n,L,r,t;
cin>>n>>L>>r>>t;
for (int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
cin>>A[i][j];
A[i][j]=A[i][j]+A[i][j-1];
}}
for (int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
A[i][j]=A[i][j]+A[i-1][j];
}
}
int count =0,sum =0,nums =0;
double avg;
int row1,col1,row2, col2;
for(int i=1;i<=n;i++)
{
for (int j=1;j<=n;j++)
{
row1=min(i+r,n);
col1=min(j+r,n);
row2=max(i-r-1,0);
col2=max(j-r-1,0);
sum=A[row1][col1]+A[row2][col2]-A[row2][col1]-A[row1][col2];
avg=sum*1.0/((row1-row2)*(col1-col2));
if (avg<=t)
{
count++;
}
}
}
cout<<count;
return 0;
}