import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d[] = new int[n];
        for (int i = 0; i < n; i++)
            d[i] = sc.nextInt();
        Arrays.sort(d);
        int cnt = 0;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        }
        System.out.println(cnt);
    }
} import java.math.*; math.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d[] = new int[n];
        for (int i = 0; i < n; i++)
            d[i] = sc.nextInt();
        Arrays.sort(d);
        int cnt = 0;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        }
        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d[] = new int[n];
        for (int i = 0; i < n; i++)
            d[i] = sc.nextInt();
        Arrays.sort(d);
        int cnt = 0;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d[] = new int[n];
        for (int i = 0; i < n; i++)
            d[i] = sc.nextInt();
        Arrays.sort(d);
        int cnt = 0;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int d[] = new int[n]; d new int[n] n for (int i = 0; i < n; i++)
            d[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i d[i] = sc.nextInt(); d[i] = sc.nextInt() d[i] d i sc.nextInt() sc.nextInt sc Arrays.sort(d) Arrays.sort Arrays d int cnt = 0; cnt 0 int tmp = 0; tmp 0 for (int i = 0; i < n; i++) {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        } {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        } if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++; tmp == d[i] tmp d[i] d i {
                tmp = d[i];
                continue;
            } tmp = d[i] tmp d[i] d i continue; cnt++ cnt tmp = d[i] tmp d[i] d i 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) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d[] = new int[n];
        for (int i = 0; i < n; i++)
            d[i] = sc.nextInt();
        Arrays.sort(d);
        int cnt = 0;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        }
        System.out.println(cnt);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d[] = new int[n];
        for (int i = 0; i < n; i++)
            d[i] = sc.nextInt();
        Arrays.sort(d);
        int cnt = 0;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        }
        System.out.println(cnt);
    }
} Main
import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d[] = new int[n];
        for (int i = 0; i < n; i++)
            d[i] = sc.nextInt();
        Arrays.sort(d);
        int cnt = 0;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            if (tmp == d[i]) {
                tmp = d[i];
                continue;
            } else
                cnt++;
            tmp = d[i];
        }
        System.out.println(cnt);
    }
}