import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        Integer[] d = new Integer[N];
        int count = 0;

        for (int i = 0; i < N; i++) {
            d[i] = Integer.parseInt(sc.next());
        }

        Arrays.sort(d, Collections.reverseOrder());

        for (int i = 0; i < N; i++) {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        Integer[] d = new Integer[N];
        int count = 0;

        for (int i = 0; i < N; i++) {
            d[i] = Integer.parseInt(sc.next());
        }

        Arrays.sort(d, Collections.reverseOrder());

        for (int i = 0; i < N; i++) {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        Integer[] d = new Integer[N];
        int count = 0;

        for (int i = 0; i < N; i++) {
            d[i] = Integer.parseInt(sc.next());
        }

        Arrays.sort(d, Collections.reverseOrder());

        for (int i = 0; i < N; i++) {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        Integer[] d = new Integer[N];
        int count = 0;

        for (int i = 0; i < N; i++) {
            d[i] = Integer.parseInt(sc.next());
        }

        Arrays.sort(d, Collections.reverseOrder());

        for (int i = 0; i < N; i++) {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Integer[] d = new Integer[N]; d new Integer[N] N int count = 0; count 0 for (int i = 0; i < N; i++) {
            d[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            d[i] = Integer.parseInt(sc.next());
        } {
            d[i] = Integer.parseInt(sc.next());
        } d[i] = Integer.parseInt(sc.next()) d[i] d i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Arrays.sort(d, Collections.reverseOrder()) Arrays.sort Arrays d Collections.reverseOrder() Collections.reverseOrder Collections for (int i = 0; i < N; i++) {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        } {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        } if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            } i < N - 1 i N - 1 N 1 {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            } if (d[i] > d[i + 1]) {
                    count++;
                } d[i] > d[i + 1] d[i] d i d[i + 1] d i + 1 i 1 {
                    count++;
                } count++ count if (i == N - 1) {
                count++;
            } i == N - 1 i N - 1 N 1 {
                count++;
            } count++ count PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) out.println(count) out.println out count sc.close() sc.close sc out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        Integer[] d = new Integer[N];
        int count = 0;

        for (int i = 0; i < N; i++) {
            d[i] = Integer.parseInt(sc.next());
        }

        Arrays.sort(d, Collections.reverseOrder());

        for (int i = 0; i < N; i++) {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        Integer[] d = new Integer[N];
        int count = 0;

        for (int i = 0; i < N; i++) {
            d[i] = Integer.parseInt(sc.next());
        }

        Arrays.sort(d, Collections.reverseOrder());

        for (int i = 0; i < N; i++) {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} Main
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        Integer[] d = new Integer[N];
        int count = 0;

        for (int i = 0; i < N; i++) {
            d[i] = Integer.parseInt(sc.next());
        }

        Arrays.sort(d, Collections.reverseOrder());

        for (int i = 0; i < N; i++) {
            if (i < N - 1) {
                if (d[i] > d[i + 1]) {
                    count++;
                }
            }

            if (i == N - 1) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
}