#include using namespace std; int i,j,i1,j1,A[110][110],R[110][110],C[110][110],SOL,sum,n; int main() { scanf("%d",&n); SOL=1<<29; SOL-=SOL; for(i=1;i<=n;i++) for(j=1;j<=n;j++) { scanf("%d",&A[i][j]); if(SOLn)break; if(j+size>n)break; sum=R[i+size][j+size]+R[i-1][j-1]-R[i+size][j-1]-R[i-1][j+size]-R[i+size-1][j+size-1]+R[i][j+size-1]+R[i+size-1][j]-R[i][j]; if(sum>SOL)SOL=sum; } printf("%d\n",SOL); return 0; }