import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        List<Integer> numList = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            numList.add(Integer.parseInt(sc.next()));
        }
        numList.sort(Comparator.reverseOrder());
        int preNum = 0;
        List<Integer> removeList = new ArrayList<>();
        for (int i = 0; i < numList.size(); i++) {
            int n = numList.get(i).intValue();
            if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            }
        }
        removeList.sort(Comparator.reverseOrder());
        for (Integer i:
             removeList) {
            numList.remove(i.intValue());
        }
        System.out.println(numList.size());
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Comparator; Comparator java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        List<Integer> numList = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            numList.add(Integer.parseInt(sc.next()));
        }
        numList.sort(Comparator.reverseOrder());
        int preNum = 0;
        List<Integer> removeList = new ArrayList<>();
        for (int i = 0; i < numList.size(); i++) {
            int n = numList.get(i).intValue();
            if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            }
        }
        removeList.sort(Comparator.reverseOrder());
        for (Integer i:
             removeList) {
            numList.remove(i.intValue());
        }
        System.out.println(numList.size());
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        List<Integer> numList = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            numList.add(Integer.parseInt(sc.next()));
        }
        numList.sort(Comparator.reverseOrder());
        int preNum = 0;
        List<Integer> removeList = new ArrayList<>();
        for (int i = 0; i < numList.size(); i++) {
            int n = numList.get(i).intValue();
            if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            }
        }
        removeList.sort(Comparator.reverseOrder());
        for (Integer i:
             removeList) {
            numList.remove(i.intValue());
        }
        System.out.println(numList.size());
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        List<Integer> numList = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            numList.add(Integer.parseInt(sc.next()));
        }
        numList.sort(Comparator.reverseOrder());
        int preNum = 0;
        List<Integer> removeList = new ArrayList<>();
        for (int i = 0; i < numList.size(); i++) {
            int n = numList.get(i).intValue();
            if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            }
        }
        removeList.sort(Comparator.reverseOrder());
        for (Integer i:
             removeList) {
            numList.remove(i.intValue());
        }
        System.out.println(numList.size());
    } 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 List<Integer> numList = new ArrayList<>(); numList new ArrayList<>() for (int i = 0; i < N; i++) {
            numList.add(Integer.parseInt(sc.next()));
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            numList.add(Integer.parseInt(sc.next()));
        } {
            numList.add(Integer.parseInt(sc.next()));
        } numList.add(Integer.parseInt(sc.next())) numList.add numList Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc numList.sort(Comparator.reverseOrder()) numList.sort numList Comparator.reverseOrder() Comparator.reverseOrder Comparator int preNum = 0; preNum 0 List<Integer> removeList = new ArrayList<>(); removeList new ArrayList<>() for (int i = 0; i < numList.size(); i++) {
            int n = numList.get(i).intValue();
            if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            }
        } int i = 0; int i = 0; i 0 i < numList.size() i numList.size() numList.size numList i++ i++ i {
            int n = numList.get(i).intValue();
            if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            }
        } {
            int n = numList.get(i).intValue();
            if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            }
        } int n = numList.get(i).intValue(); n numList.get(i).intValue() numList.get(i).intValue numList.get(i) numList.get numList i if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            } n == preNum n preNum {
                removeList.add(i);
            } removeList.add(i) removeList.add removeList i {
                preNum = n;
            } preNum = n preNum n removeList.sort(Comparator.reverseOrder()) removeList.sort removeList Comparator.reverseOrder() Comparator.reverseOrder Comparator for (Integer i:
             removeList) {
            numList.remove(i.intValue());
        } Integer i removeList {
            numList.remove(i.intValue());
        } {
            numList.remove(i.intValue());
        } numList.remove(i.intValue()) numList.remove numList i.intValue() i.intValue i System.out.println(numList.size()) System.out.println System.out System System.out numList.size() numList.size numList String[] args args
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        List<Integer> numList = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            numList.add(Integer.parseInt(sc.next()));
        }
        numList.sort(Comparator.reverseOrder());
        int preNum = 0;
        List<Integer> removeList = new ArrayList<>();
        for (int i = 0; i < numList.size(); i++) {
            int n = numList.get(i).intValue();
            if (n == preNum) {
                removeList.add(i);
            } else {
                preNum = n;
            }
        }
        removeList.sort(Comparator.reverseOrder());
        for (Integer i:
             removeList) {
            numList.remove(i.intValue());
        }
        System.out.println(numList.size());
    }
}