#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#define rep(i,k,n) for(int (i)=(k);(i)<(n);(i)++)
#define max(a,b) (a)>(b)?(a):(b)
#define min(a,b) (a)<(b)?(a):(b)
#define abs(a) (a)>0 ?(a):-(a)
#define llong long long

struct list{
	char s[20];
	struct list *left;
	struct list *right;
};

int insert(struct list**,char*);

int main(){
	int N; scanf("%d",&N);
	struct list *top = NULL;
	int cnt=0;
	rep(i,0,N){
		char s[20]; scanf("%s",s);
		cnt += insert(&top,s);
	}
	printf("%d",cnt);
	return 0;
}

int insert(struct list **top,char *s){
	if( *top == NULL ){
		*top = (struct list*)malloc(sizeof(struct list));
		strcpy((*top)->s,s);
		(*top)->left=NULL; (*top)->right=NULL;
		return 1;
	}
	struct list *t = *top;
	while(1){
		if( strcmp(t->s,s) < 0 ){
			if( t->left == NULL ){
				t->left = (struct list*)malloc(sizeof(struct list));
				t = t->left;
				strcpy(t->s,s); t->left=NULL; t->right=NULL;
				return 1;
			}else{
				t = t->left;
			}
		}else if( strcmp(t->s,s) > 0 ){
			if( t->right == NULL ){
				t->right = (struct list*)malloc(sizeof(struct list));
				t = t->right;
				strcpy(t->s,s); t->left=NULL; t->right=NULL;
				return 1;
			}else{
				t = t->right;
			}
		}else if( strcmp(t->s,s)==0 ){
			return 0;
		}
	}
}
