program Project2; {$APPTYPE CONSOLE} uses SysUtils; var a:array[1..1000,1000] of integer;n,m,i,j:integer,input,output,text; begin assign(input,'legancy.in'); assign(output,'lagancy.out'); reset(input); rewrite(output); readln(input,n,m); while not eof(input) do begin j:=j+1; while not eoln(input) do begin i:=i+1; read(input,a[j,i]); end; z:=i; i:=0; write(output,j); close(output); end.