import java.util.Scanner;
import java.util.Arrays;
 
public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        int n = stdIn.nextInt();
        String[] s = new String[n];
        for(int i=0; i<n; i++){
            s[i] = stdIn.next();
        }

        Arrays.sort(s);

        String prev = s[0];
        int counter = 1;
        for(int i=1; i<n; i++){
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        }

        System.out.println(counter);
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        int n = stdIn.nextInt();
        String[] s = new String[n];
        for(int i=0; i<n; i++){
            s[i] = stdIn.next();
        }

        Arrays.sort(s);

        String prev = s[0];
        int counter = 1;
        for(int i=1; i<n; i++){
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        }

        System.out.println(counter);
    }
} Main static Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) public static void main(String[] args){
        int n = stdIn.nextInt();
        String[] s = new String[n];
        for(int i=0; i<n; i++){
            s[i] = stdIn.next();
        }

        Arrays.sort(s);

        String prev = s[0];
        int counter = 1;
        for(int i=1; i<n; i++){
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        }

        System.out.println(counter);
    } main {
        int n = stdIn.nextInt();
        String[] s = new String[n];
        for(int i=0; i<n; i++){
            s[i] = stdIn.next();
        }

        Arrays.sort(s);

        String prev = s[0];
        int counter = 1;
        for(int i=1; i<n; i++){
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        }

        System.out.println(counter);
    } int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn String[] s = new String[n]; s new String[n] n for(int i=0; i<n; i++){
            s[i] = stdIn.next();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            s[i] = stdIn.next();
        } {
            s[i] = stdIn.next();
        } s[i] = stdIn.next() s[i] s i stdIn.next() stdIn.next stdIn Arrays.sort(s) Arrays.sort Arrays s String prev = s[0]; prev s[0] s 0 int counter = 1; counter 1 for(int i=1; i<n; i++){
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        } int i=1; int i=1; i 1 i<n i n i++ i++ i {
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        } {
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        } if(!s[i].equals(prev)){
                counter++;
            } !s[i].equals(prev) s[i].equals(prev) s[i].equals s[i] s i prev {
                counter++;
            } counter++ counter prev = s[i] prev s[i] s i System.out.println(counter) System.out.println System.out System System.out counter String[] args args public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        int n = stdIn.nextInt();
        String[] s = new String[n];
        for(int i=0; i<n; i++){
            s[i] = stdIn.next();
        }

        Arrays.sort(s);

        String prev = s[0];
        int counter = 1;
        for(int i=1; i<n; i++){
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        }

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

        Arrays.sort(s);

        String prev = s[0];
        int counter = 1;
        for(int i=1; i<n; i++){
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        }

        System.out.println(counter);
    }
} Main
import java.util.Scanner;
import java.util.Arrays;
 
public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        int n = stdIn.nextInt();
        String[] s = new String[n];
        for(int i=0; i<n; i++){
            s[i] = stdIn.next();
        }

        Arrays.sort(s);

        String prev = s[0];
        int counter = 1;
        for(int i=1; i<n; i++){
            if(!s[i].equals(prev)){
                counter++;
            }
            prev = s[i];
        }

        System.out.println(counter);
    }
}