import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        TreeSet<String> s = new TreeSet<>();
        for(int i = 0; i < n; i++) s.add(scan.next());
        System.out.println(s.size());
    }
    
    public static void main(String[] args){
        new Main().solve();
    }
} import java.util.*; util.* java public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        TreeSet<String> s = new TreeSet<>();
        for(int i = 0; i < n; i++) s.add(scan.next());
        System.out.println(s.size());
    }
    
    public static void main(String[] args){
        new Main().solve();
    }
} Main void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        TreeSet<String> s = new TreeSet<>();
        for(int i = 0; i < n; i++) s.add(scan.next());
        System.out.println(s.size());
    } solve {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        TreeSet<String> s = new TreeSet<>();
        for(int i = 0; i < n; i++) s.add(scan.next());
        System.out.println(s.size());
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan TreeSet<String> s = new TreeSet<>(); s new TreeSet<>() for(int i = 0; i < n; i++) s.add(scan.next()); int i = 0; int i = 0; i 0 i < n i n i++ i++ i s.add(scan.next()); s.add(scan.next()) s.add s scan.next() scan.next scan System.out.println(s.size()) System.out.println System.out System System.out s.size() s.size s public static void main(String[] args){
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        TreeSet<String> s = new TreeSet<>();
        for(int i = 0; i < n; i++) s.add(scan.next());
        System.out.println(s.size());
    }
    
    public static void main(String[] args){
        new Main().solve();
    }
} public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        TreeSet<String> s = new TreeSet<>();
        for(int i = 0; i < n; i++) s.add(scan.next());
        System.out.println(s.size());
    }
    
    public static void main(String[] args){
        new Main().solve();
    }
} Main
import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        TreeSet<String> s = new TreeSet<>();
        for(int i = 0; i < n; i++) s.add(scan.next());
        System.out.println(s.size());
    }
    
    public static void main(String[] args){
        new Main().solve();
    }
}
