import java.util.*;
import java.util.stream.Collectors;

class Main {
    public static void main(String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String str;
        Set<String> A = new HashSet<String>();
        for(int i = 0 ; i < N ; i++){
            str = sc.nextLine();
            A.add(str);
        }
        System.out.println(A.size()); 
        sc.close();
    }
} import java.util.*; util.* java import java.util.stream.Collectors; Collectors java.util.stream class Main {
    public static void main(String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String str;
        Set<String> A = new HashSet<String>();
        for(int i = 0 ; i < N ; i++){
            str = sc.nextLine();
            A.add(str);
        }
        System.out.println(A.size()); 
        sc.close();
    }
} Main public static void main(String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String str;
        Set<String> A = new HashSet<String>();
        for(int i = 0 ; i < N ; i++){
            str = sc.nextLine();
            A.add(str);
        }
        System.out.println(A.size()); 
        sc.close();
    } main {
        final Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String str;
        Set<String> A = new HashSet<String>();
        for(int i = 0 ; i < N ; i++){
            str = sc.nextLine();
            A.add(str);
        }
        System.out.println(A.size()); 
        sc.close();
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String str; str Set<String> A = new HashSet<String>(); A new HashSet<String>() for(int i = 0 ; i < N ; i++){
            str = sc.nextLine();
            A.add(str);
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            str = sc.nextLine();
            A.add(str);
        } {
            str = sc.nextLine();
            A.add(str);
        } str = sc.nextLine() str sc.nextLine() sc.nextLine sc A.add(str) A.add A str System.out.println(A.size()) System.out.println System.out System System.out A.size() A.size A sc.close() sc.close sc String[] args args
import java.util.*;
import java.util.stream.Collectors;

class Main {
    public static void main(String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String str;
        Set<String> A = new HashSet<String>();
        for(int i = 0 ; i < N ; i++){
            str = sc.nextLine();
            A.add(str);
        }
        System.out.println(A.size()); 
        sc.close();
    }
}