Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int N,M;
   cin >> N >> M;

   vector<int> L(M), R(M);

   for(int i=0;i<M;++i){
      cin >> L[i] >> R[i];
   }

   cout << *min_element(R.begin(), R.end()) - *max_element(L.begin(), L.end()) + 1 << endl;

}


Compiler output:
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:47:5: error: redefinition of 'int main()'
   47 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:67:5: error: redefinition of 'int main()'
   67 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:87:5: error: redefinition of 'int main()'
   87 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:107:5: error: redefinition of 'int main()'
  107 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:127:5: error: redefinition of 'int main()'
  127 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:147:5: error: redefinition of 'int main()'
  147 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:167:5: error: redefinition of 'int main()'
  167 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:187:5: error: redefinition of 'int main()'
  187 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:207:5: error: redefinition of 'int main()'
  207 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:227:5: error: redefinition of 'int main()'
  227 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:247:5: error: redefinition of 'int main()'
  247 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:267:5: error: redefinition of 'int main()'
  267 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:287:5: error: redefinition of 'int main()'
  287 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:307:5: error: redefinition of 'int main()'
  307 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:327:5: error: redefinition of 'int main()'
  327 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:347:5: error: redefinition of 'int main()'
  347 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:367:5: error: redefinition of 'int main()'
  367 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:387:5: error: redefinition of 'int main()'
  387 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:407:5: error: redefinition of 'int main()'
  407 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:427:5: error: redefinition of 'int main()'
  427 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:447:5: error: redefinition of 'int main()'
  447 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:467:5: error: redefinition of 'int main()'
  467 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:487:5: error: redefinition of 'int main()'
  487 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:507:5: error: redefinition of 'int main()'
  507 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:527:5: error: redefinition of 'int main()'
  527 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:547:5: error: redefinition of 'int main()'
  547 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:567:5: error: redefinition of 'int main()'
  567 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:587:5: error: redefinition of 'int main()'
  587 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:607:5: error: redefinition of 'int main()'
  607 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:627:5: error: redefinition of 'int main()'
  627 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:647:5: error: redefinition of 'int main()'
  647 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:667:5: error: redefinition of 'int main()'
  667 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:687:5: error: redefinition of 'int main()'
  687 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:707:5: error: redefinition of 'int main()'
  707 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:727:5: error: redefinition of 'int main()'
  727 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:747:5: error: redefinition of 'int main()'
  747 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:767:5: error: redefinition of 'int main()'
  767 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:787:5: error: redefinition of 'int main()'
  787 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:807:5: error: redefinition of 'int main()'
  807 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:827:5: error: redefinition of 'int main()'
  827 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:847:5: error: redefinition of 'int main()'
  847 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:867:5: error: redefinition of 'int main()'
  867 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:887:5: error: redefinition of 'int main()'
  887 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:907:5: error: redefinition of 'int main()'
  907 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:927:5: error: redefinition of 'int main()'
  927 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:947:5: error: redefinition of 'int main()'
  947 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:967:5: error: redefinition of 'int main()'
  967 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:987:5: error: redefinition of 'int main()'
  987 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1007:5: error: redefinition of 'int main()'
 1007 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1027:5: error: redefinition of 'int main()'
 1027 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1047:5: error: redefinition of 'int main()'
 1047 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1067:5: error: redefinition of 'int main()'
 1067 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1087:5: error: redefinition of 'int main()'
 1087 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1107:5: error: redefinition of 'int main()'
 1107 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1127:5: error: redefinition of 'int main()'
 1127 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1147:5: error: redefinition of 'int main()'
 1147 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1167:5: error: redefinition of 'int main()'
 1167 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1187:5: error: redefinition of 'int main()'
 1187 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
a.cc:1207:5: error: redefini