program Project2; {$APPTYPE CONSOLE} uses SysUtils; var n,k,i,j,max,x: integer; a: array [0..10000,0..10000] of integer; begin { TODO -oUser -cConsole Main : Insert code here } assign(input,'legacy.in'); reset(input); readln(n,k); for i:=1 to n do for j:=1 to n do read(a[i,j]); assign(output,'legacy.out'); rewrite(output); max:=0 ; for j:=1 to n do begin if a[2,j]>max then max:=a[2,j]; end; x:=n*max; writeln(x); end.