l,m,i,j,x,y,s:longint;
a:array[0..10000]of longint;
begin
readln(l,m);
for i:=1 to m do
readln(x,y);
for j:=x to y do a[j]:=1;
end;
s:=0;
for i:=0 to l do
if a[i]=0 then s:=s+1;
writeln(s);
end.
快速帮助 | 运行状态 | 反馈举报 | 关于我们 | 免责声明 | 浙ICP备11060257号 Processed in 0.0036 Second(s) Copyright (C) RQNOJ 2007-2019. All Rights Reserved.