import java.io.File;
import java.util.Scanner;
import java.util.TreeSet;

public class Main {
	public static void main(String[] args) {
		//task b battle
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); sc.nextLine();
		TreeSet<String> vals = new TreeSet<>();
		for(int i = 0; i< n; i++){
			vals.add(sc.nextLine());
		}
		System.out.println(vals.size());

	}
} import java.io.File; File java.io import java.util.Scanner; Scanner java.util import java.util.TreeSet; TreeSet java.util public class Main {
	public static void main(String[] args) {
		//task b battle
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); sc.nextLine();
		TreeSet<String> vals = new TreeSet<>();
		for(int i = 0; i< n; i++){
			vals.add(sc.nextLine());
		}
		System.out.println(vals.size());

	}
} Main public static void main(String[] args) {
		//task b battle
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); sc.nextLine();
		TreeSet<String> vals = new TreeSet<>();
		for(int i = 0; i< n; i++){
			vals.add(sc.nextLine());
		}
		System.out.println(vals.size());

	} main {
		//task b battle
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); sc.nextLine();
		TreeSet<String> vals = new TreeSet<>();
		for(int i = 0; i< n; i++){
			vals.add(sc.nextLine());
		}
		System.out.println(vals.size());

	} 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 TreeSet<String> vals = new TreeSet<>(); vals new TreeSet<>() for(int i = 0; i< n; i++){
			vals.add(sc.nextLine());
		} int i = 0; int i = 0; i 0 i< n i n i++ i++ i {
			vals.add(sc.nextLine());
		} {
			vals.add(sc.nextLine());
		} vals.add(sc.nextLine()) vals.add vals sc.nextLine() sc.nextLine sc System.out.println(vals.size()) System.out.println System.out System System.out vals.size() vals.size vals String[] args args public class Main {
	public static void main(String[] args) {
		//task b battle
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); sc.nextLine();
		TreeSet<String> vals = new TreeSet<>();
		for(int i = 0; i< n; i++){
			vals.add(sc.nextLine());
		}
		System.out.println(vals.size());

	}
} public class Main {
	public static void main(String[] args) {
		//task b battle
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); sc.nextLine();
		TreeSet<String> vals = new TreeSet<>();
		for(int i = 0; i< n; i++){
			vals.add(sc.nextLine());
		}
		System.out.println(vals.size());

	}
} Main
import java.io.File;
import java.util.Scanner;
import java.util.TreeSet;

public class Main {
	public static void main(String[] args) {
		//task b battle
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); sc.nextLine();
		TreeSet<String> vals = new TreeSet<>();
		for(int i = 0; i< n; i++){
			vals.add(sc.nextLine());
		}
		System.out.println(vals.size());

	}
}
