// Restaurant Customers #include using namespace std; using ll = long long; int main() { int n; cin >> n; map m; for (int i{}; i < n; i++) { ll a, b; cin >> a >> b; m[a]++; m[b]--; } int max_count = 0; int count = 0; for (auto &[t, c]: m) { count += c; max_count = max(max_count, count); } cout << max_count << endl; return 0; }