#include<stdio.h>
int main(void){
    int n;
    scanf("%d",&n);
    char s[n][11];
    int i,j;
    int count=1;
    for(i=0;i<n;++i){
        scanf("%s",s[i]);
    }
    int c[n];
    for(i=0;i<n;++i){
        c[i]=0;
    }
    for(i=0;i<n;++i){
        for(j=0;j<n;++j){
            if(s[i][j]!='\0'){
                c[i]+=1;
            }
        }
    }
    for(i=0;i<n-1;++i){
        if(c[i]!=c[i+1]){
            count+=1;
        }
    }
    for(i=1;i<n;++i){
        if(s[0][0]!=s[i][0]&&s[0][1]!=s[i][1]&&s[0][2]!=s[i][2]&&s[0][3]!=s[i][3]&&s[0][4]!=s[i][4]&&s[0][5]!=s[i][5]&&s[0][6]!=s[i][6]&&s[0][7]!=s[i][7]&&s[0][8]!=s[i][8]&&s[0][9]!=s[i][9]&&s[0][10]!=s[i][10]){
            count+=1;
        }
    }
    printf("%d\n",count);
    return 0;
}