include[HTML_REMOVED]
using namespace std;
int main(){
int n;
cin>>n;
int person[25][61]={0};
int big=0;
for(int i=0;i[HTML_REMOVED]>a>>b;
person[a][b]++;
big=max(big,person[a][b]);
}
cout<<big;
return 0;
}