#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin>>n;
vector<int>time_table(16,0);
for (int i=0;i<n;i++){
int s,e;
cin>>s>>e;
for (int j=s;j<e;j++)time_table[j]++;
}
int ans=*max_element(time_table.begin(),time_table.end());
cout<<ans<<"\n";
return 0;
}//Butcher Vanity(1억뷰!) SV1&SV2&2p 모두 디자인 ㄷㅂ 잘 나옴... 어쨋거나 아니 걔내(Yi Xi!!) 목소리 왜이렇게 좋음...
To embed this project on your website, copy the following code and paste it into your website's HTML: