#include using namespace std; short a[50][50]; int s=-1000000000; void back(short k1,short i,short j) { short k; int q=0; short o=j-i+k1; for(k=i;k<=j;++k) { q+=a[k1][k]; } for(k=k1+1;k<=o;++k) { q+=a[k][i]; q+=a[k][j]; } --k; for(k1=i+1;k1s) s=q; } int main() { short n,i,j,k1; scanf("%hd",&n); for(i=0;ii;--j) back(k1,i,j); printf("%d\n",s); } return 0; }