//uses sysutils; type re=record num:longint; flag:longint; end; var i,j,k,m,n,count,s,e,max:longint; t1:tdatetime; a:array[0..1000001] of re; procedure qsort( s,t:longint); var i,j,k,p:longint; temp:re; begin if s>=t then exit; p:=s+(t-s)div 2; i:=s;j:=t; temp:=a[p];a[p]:=a[s]; repeat while(i=temp.num) do dec(j); if i=j then break; a[i]:=a[j]; inc(i); while (i0 then begin a[k].flag:=0;dec(s); end else a[k].flag:=1; end; i:=j+1; end; //for i:=1 to 2*n do writeln(a[i].num,' ',a[i].flag); count:=0;max:=0; for i:=1 to 2*n do begin if a[i].flag=0 then inc(count) else dec(count); if count>max then max:=count; end; writeln(max); //writeln((now-t1)*86400:0:2); close(input); end.