#include #define int long long using namespace std; signed main(){ int N,M; cin>>N>>M; int n=0,t=0; while(M--){ int a,b; cin>>a>>b; if(abs(a-t)