import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		long cnt = stdin.lines().skip(1).sorted().distinct().count();
		System.out.println(cnt);
	}

} import java.io.*; io.* java public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		long cnt = stdin.lines().skip(1).sorted().distinct().count();
		System.out.println(cnt);
	}

} Main public static void main(String[] args) throws IOException{
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		long cnt = stdin.lines().skip(1).sorted().distinct().count();
		System.out.println(cnt);
	} main {
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		long cnt = stdin.lines().skip(1).sorted().distinct().count();
		System.out.println(cnt);
	} BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); stdin new BufferedReader(new InputStreamReader(System.in)) long cnt = stdin.lines().skip(1).sorted().distinct().count(); cnt stdin.lines().skip(1).sorted().distinct().count() stdin.lines().skip(1).sorted().distinct().count stdin.lines().skip(1).sorted().distinct() stdin.lines().skip(1).sorted().distinct stdin.lines().skip(1).sorted() stdin.lines().skip(1).sorted stdin.lines().skip(1) stdin.lines().skip stdin.lines() stdin.lines stdin 1 System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		long cnt = stdin.lines().skip(1).sorted().distinct().count();
		System.out.println(cnt);
	}

} public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		long cnt = stdin.lines().skip(1).sorted().distinct().count();
		System.out.println(cnt);
	}

} Main
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		long cnt = stdin.lines().skip(1).sorted().distinct().count();
		System.out.println(cnt);
	}

}