import java.io.*;
import java.math.*;
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		String[] arr = new String[N];
		int[] cnt = new int[N];
		cnt[0]=1;
		for (int i = 0; i < N; i++) {
			arr[i] = input.next();
		}
		Arrays.sort(arr);
		for (int i = 1; i < arr.length; i++) {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		}
		System.out.println(cnt[N-1]);
	}
} import java.io.*; io.* java import java.math.*; math.* java import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		String[] arr = new String[N];
		int[] cnt = new int[N];
		cnt[0]=1;
		for (int i = 0; i < N; i++) {
			arr[i] = input.next();
		}
		Arrays.sort(arr);
		for (int i = 1; i < arr.length; i++) {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		}
		System.out.println(cnt[N-1]);
	}
} Main public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		String[] arr = new String[N];
		int[] cnt = new int[N];
		cnt[0]=1;
		for (int i = 0; i < N; i++) {
			arr[i] = input.next();
		}
		Arrays.sort(arr);
		for (int i = 1; i < arr.length; i++) {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		}
		System.out.println(cnt[N-1]);
	} main {
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		String[] arr = new String[N];
		int[] cnt = new int[N];
		cnt[0]=1;
		for (int i = 0; i < N; i++) {
			arr[i] = input.next();
		}
		Arrays.sort(arr);
		for (int i = 1; i < arr.length; i++) {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		}
		System.out.println(cnt[N-1]);
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) int N = input.nextInt(); N input.nextInt() input.nextInt input String[] arr = new String[N]; arr new String[N] N int[] cnt = new int[N]; cnt new int[N] N cnt[0]=1 cnt[0] cnt 0 1 for (int i = 0; i < N; i++) {
			arr[i] = input.next();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			arr[i] = input.next();
		} {
			arr[i] = input.next();
		} arr[i] = input.next() arr[i] arr i input.next() input.next input Arrays.sort(arr) Arrays.sort Arrays arr for (int i = 1; i < arr.length; i++) {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		} int i = 1; int i = 1; i 1 i < arr.length i arr.length arr arr.length i++ i++ i {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		} {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		} cnt[i] = cnt[i-1]+1 cnt[i] cnt i cnt[i-1]+1 cnt[i-1] cnt i-1 i 1 1 for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} int j = i-1; int j = i-1; j i-1 i 1 j >= 0 j 0 j-- j-- j {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break; arr[i].equals(arr[j]) arr[i].equals arr[i] arr i arr[j] arr j {
					cnt[i]--;
					break;
				} cnt[i]-- cnt[i] cnt i break; break; System.out.println(cnt[N-1]) System.out.println System.out System System.out cnt[N-1] cnt N-1 N 1 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		String[] arr = new String[N];
		int[] cnt = new int[N];
		cnt[0]=1;
		for (int i = 0; i < N; i++) {
			arr[i] = input.next();
		}
		Arrays.sort(arr);
		for (int i = 1; i < arr.length; i++) {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		}
		System.out.println(cnt[N-1]);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		String[] arr = new String[N];
		int[] cnt = new int[N];
		cnt[0]=1;
		for (int i = 0; i < N; i++) {
			arr[i] = input.next();
		}
		Arrays.sort(arr);
		for (int i = 1; i < arr.length; i++) {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		}
		System.out.println(cnt[N-1]);
	}
} Main
import java.io.*;
import java.math.*;
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		String[] arr = new String[N];
		int[] cnt = new int[N];
		cnt[0]=1;
		for (int i = 0; i < N; i++) {
			arr[i] = input.next();
		}
		Arrays.sort(arr);
		for (int i = 1; i < arr.length; i++) {
			cnt[i] = cnt[i-1]+1;
			for (int j = i-1; j >= 0; j--) {
				if (arr[i].equals(arr[j])) {
					cnt[i]--;
					break;
				}else break;
			} 
		}
		System.out.println(cnt[N-1]);
	}
}