import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        if(n<=1){
            System.out.println(n);
            return;
        }
        HashSet<Long> count = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        }
        System.out.println(count.size());
    }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        if(n<=1){
            System.out.println(n);
            return;
        }
        HashSet<Long> count = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        }
        System.out.println(count.size());
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        if(n<=1){
            System.out.println(n);
            return;
        }
        HashSet<Long> count = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        }
        System.out.println(count.size());
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        if(n<=1){
            System.out.println(n);
            return;
        }
        HashSet<Long> count = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        }
        System.out.println(count.size());
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = Integer.parseInt(scanner.nextLine()); n Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner if(n<=1){
            System.out.println(n);
            return;
        } n<=1 n 1 {
            System.out.println(n);
            return;
        } System.out.println(n) System.out.println System.out System System.out n return; HashSet<Long> count = new HashSet<>(); count new HashSet<>() for (int i = 0; i < n; i++) {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        } {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        } String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner long a = 0; a 0 for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            } char c s.toCharArray() s.toCharArray s {
                a = a*27+c-'a'+1;
            } {
                a = a*27+c-'a'+1;
            } a = a*27+c-'a'+1 a a*27+c-'a'+1 a*27+c-'a' a*27+c a*27 a 27 c 'a' 1 count.add(a) count.add count a System.out.println(count.size()) System.out.println System.out System System.out count.size() count.size count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        if(n<=1){
            System.out.println(n);
            return;
        }
        HashSet<Long> count = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        }
        System.out.println(count.size());
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        if(n<=1){
            System.out.println(n);
            return;
        }
        HashSet<Long> count = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        }
        System.out.println(count.size());
    }
} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        if(n<=1){
            System.out.println(n);
            return;
        }
        HashSet<Long> count = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String s = scanner.nextLine();
            long a = 0;
            for (char c : s.toCharArray()) {
                a = a*27+c-'a'+1;
            }
            count.add(a);
        }
        System.out.println(count.size());
    }
}
