#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,sum=0;
	cin>>n;
	string s[n+5][10];
	for(int i=1;i<=n;i++){
		for(int j=1;j<=10;j++){
			cin>>s[i][j];
		}
	}
	
	for(int i=1;i<=n;i++){
		for(int j=1;j<=0;j++){
				if(s[j][1]==s[i][1]&&s[j][2]==s[i][2]&&s[j][3]==s[i][3]&&s[j][4]==s[i][4]&&s[j][5]==s[i][5]&&s[j][6]==s[i][6]&&s[j][7]==s[i][7]&&s[j][8]==s[i][8]&&s[j][9]==s[i][9]&&s[j][10]==s[i][10]) break;
				else sum++;
		}
	}
	
	cout<<sum;
	return 0;
}