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

struct node{
    string key;
    node *left ,*right;
};
void pushtree(node* p,node* tree);


long int c=1;




void show(node* tree){
    if(tree==nullptr){
        return;
    }
    show(tree->left);
    cout<<tree->key;
    show(tree->right);
}

int main(){
    int N;
    cin>>N;
    int count=1;
    string input;
    int ju=1;
    node *tree;
    tree = new node;
    cin>>tree->key;
    //cin>>tree->key;
    vector<node*> p(200000);
    for(int i=1;i<N;i++){
        cin>>input;
        p.at(i)= new node;
        p.at(i)->key = input;
        pushtree(p.at(i),tree);

        /*for(int j=0;j<S.size()-1;j++){
            if(S.at(j)==input){
                S.pop_back();
                break;
            }
        }*/

    }
    cout<<c<<endl;

}


void pushtree(node* p,node* tree){
    if(tree==nullptr){*tree=*p; c++; return;}
    if(p->key==tree->key){return;}
    if(p->key>tree->key){
        pushtree(p,tree->right);
    }
    if(p->key<tree->key){
        pushtree(p,tree->left);
    }
}
