import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {

    private static Scanner sc;

    public static void main(String[] args) {
        Main instance = new Main();
        sc = instance.new Scanner();
        instance.solve();
    }

    private void solve() {
        try {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void quickSort(int arr[], int begin, int end) {
        if (begin < end) {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        }
    }
    
    private int partition(int arr[], int begin, int end) {
        int pivot = arr[end];
        int i = (begin-1);
    
        for (int j = begin; j < end; j++) {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        }
    
        int swapTemp = arr[i+1];
        arr[i+1]= arr[end];
        arr[end]= swapTemp;
    
        return i+1;
    }

    private class Scanner {
        String[] s;
        int i;
        BufferedReader br;
        String regex = " ";

        public Scanner() {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        @Override
        protected void finalize() throws Throwable {
            try {
                super.finalize();
            } finally {
                destruction();
            }
        }

        private void destruction() throws IOException {
            if (br != null) br.close();
        }

        public String next() throws IOException {
            if (i < s.length) return s[i++];
            String st = br.readLine();
            while (st == "") st = br.readLine();
            s = st.split(regex, 0);
            i = 0;
            return s[i++];
        }

        public int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(next());
        }

        public Long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(next());
        }

        public Double nextDouble() throws NumberFormatException, IOException {
            return Double.parseDouble(next());
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util public class Main {

    private static Scanner sc;

    public static void main(String[] args) {
        Main instance = new Main();
        sc = instance.new Scanner();
        instance.solve();
    }

    private void solve() {
        try {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void quickSort(int arr[], int begin, int end) {
        if (begin < end) {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        }
    }
    
    private int partition(int arr[], int begin, int end) {
        int pivot = arr[end];
        int i = (begin-1);
    
        for (int j = begin; j < end; j++) {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        }
    
        int swapTemp = arr[i+1];
        arr[i+1]= arr[end];
        arr[end]= swapTemp;
    
        return i+1;
    }

    private class Scanner {
        String[] s;
        int i;
        BufferedReader br;
        String regex = " ";

        public Scanner() {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        @Override
        protected void finalize() throws Throwable {
            try {
                super.finalize();
            } finally {
                destruction();
            }
        }

        private void destruction() throws IOException {
            if (br != null) br.close();
        }

        public String next() throws IOException {
            if (i < s.length) return s[i++];
            String st = br.readLine();
            while (st == "") st = br.readLine();
            s = st.split(regex, 0);
            i = 0;
            return s[i++];
        }

        public int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(next());
        }

        public Long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(next());
        }

        public Double nextDouble() throws NumberFormatException, IOException {
            return Double.parseDouble(next());
        }
    }
} Main private static Scanner sc; sc public static void main(String[] args) {
        Main instance = new Main();
        sc = instance.new Scanner();
        instance.solve();
    } main {
        Main instance = new Main();
        sc = instance.new Scanner();
        instance.solve();
    } Main instance = new Main(); instance new Main() sc = instance.new Scanner() sc instance.new Scanner() instance instance instance.solve() instance.solve instance String[] args args private void solve() {
        try {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } solve {
        try {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } try {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } catch (Exception e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        } Exception e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] d = new int[N]; d new int[N] N for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); } int n = 0; int n = 0; n 0 n<N n N n++ n++ n { d[n] = sc.nextInt(); } { d[n] = sc.nextInt(); } d[n] = sc.nextInt() d[n] d n sc.nextInt() sc.nextInt sc int dan = 0; dan 0 quickSort(d, 0, N-1) quickSort d 0 N-1 N 1 for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            } int i=0; int i=0; i 0 i<N i N i++ i++ i {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            } {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            } if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                } i!=0 i 0 {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } if(d[i-1] != d[i]) {
                        dan++;
                    } d[i-1] != d[i] d[i-1] d i-1 i 1 d[i] d i {
                        dan++;
                    } dan++ dan {
                    dan++;
                } dan++ dan System.out.println(dan) System.out.println System.out System System.out dan public void quickSort(int arr[], int begin, int end) {
        if (begin < end) {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        }
    } quickSort {
        if (begin < end) {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        }
    } if (begin < end) {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        } begin < end begin end {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        } int partitionIndex = partition(arr, begin, end); partitionIndex partition(arr, begin, end) partition arr begin end quickSort(arr, begin, partitionIndex-1) quickSort arr begin partitionIndex-1 partitionIndex 1 quickSort(arr, partitionIndex+1, end) quickSort arr partitionIndex+1 partitionIndex 1 end int arr[] arr int begin begin int end end private int partition(int arr[], int begin, int end) {
        int pivot = arr[end];
        int i = (begin-1);
    
        for (int j = begin; j < end; j++) {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        }
    
        int swapTemp = arr[i+1];
        arr[i+1]= arr[end];
        arr[end]= swapTemp;
    
        return i+1;
    } partition {
        int pivot = arr[end];
        int i = (begin-1);
    
        for (int j = begin; j < end; j++) {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        }
    
        int swapTemp = arr[i+1];
        arr[i+1]= arr[end];
        arr[end]= swapTemp;
    
        return i+1;
    } int pivot = arr[end]; pivot arr[end] arr end int i = (begin-1); i (begin-1) begin 1 for (int j = begin; j < end; j++) {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        } int j = begin; int j = begin; j begin j < end j end j++ j++ j {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        } {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        } if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            } arr[j]<= pivot arr[j] arr j pivot {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            } i++ i int swapTemp = arr[i]; swapTemp arr[i] arr i arr[i]= arr[j] arr[i] arr i arr[j] arr j arr[j]= swapTemp arr[j] arr j swapTemp int swapTemp = arr[i+1]; swapTemp arr[i+1] arr i+1 i 1 arr[i+1]= arr[end] arr[i+1] arr i+1 i 1 arr[end] arr end arr[end]= swapTemp arr[end] arr end swapTemp return i+1; i+1 i 1 int arr[] arr int begin begin int end end private class Scanner {
        String[] s;
        int i;
        BufferedReader br;
        String regex = " ";

        public Scanner() {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        @Override
        protected void finalize() throws Throwable {
            try {
                super.finalize();
            } finally {
                destruction();
            }
        }

        private void destruction() throws IOException {
            if (br != null) br.close();
        }

        public String next() throws IOException {
            if (i < s.length) return s[i++];
            String st = br.readLine();
            while (st == "") st = br.readLine();
            s = st.split(regex, 0);
            i = 0;
            return s[i++];
        }

        public int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(next());
        }

        public Long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(next());
        }

        public Double nextDouble() throws NumberFormatException, IOException {
            return Double.parseDouble(next());
        }
    } Scanner String[] s; s int i; i BufferedReader br; br String regex = " "; regex " " public Scanner() {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        } Scanner {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        } s = new String[0] s new String[0] 0 i = 0 i 0 br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) @Override
        protected void finalize() throws Throwable {
            try {
                super.finalize();
            } finally {
                destruction();
            }
        } finalize {
            try {
                super.finalize();
            } finally {
                destruction();
            }
        } try {
                super.finalize();
            } finally {
                destruction();
            } {
                destruction();
            } destruction() destruction {
                super.finalize();
            } super.finalize() super.finalize super private void destruction() throws IOException {
            if (br != null) br.close();
        } destruction {
            if (br != null) br.close();
        } if (br != null) br.close(); br != null br null br.close() br.close br public String next() throws IOException {
            if (i < s.length) return s[i++];
            String st = br.readLine();
            while (st == "") st = br.readLine();
            s = st.split(regex, 0);
            i = 0;
            return s[i++];
        } next {
            if (i < s.length) return s[i++];
            String st = br.readLine();
            while (st == "") st = br.readLine();
            s = st.split(regex, 0);
            i = 0;
            return s[i++];
        } if (i < s.length) return s[i++]; i < s.length i s.length s s.length return s[i++]; s[i++] s i++ i String st = br.readLine(); st br.readLine() br.readLine br while (st == "") st = br.readLine(); st == "" st "" st = br.readLine() st br.readLine() br.readLine br s = st.split(regex, 0) s st.split(regex, 0) st.split st regex 0 i = 0 i 0 return s[i++]; s[i++] s i++ i public int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public Long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public Double nextDouble() throws NumberFormatException, IOException {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public class Main {

    private static Scanner sc;

    public static void main(String[] args) {
        Main instance = new Main();
        sc = instance.new Scanner();
        instance.solve();
    }

    private void solve() {
        try {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void quickSort(int arr[], int begin, int end) {
        if (begin < end) {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        }
    }
    
    private int partition(int arr[], int begin, int end) {
        int pivot = arr[end];
        int i = (begin-1);
    
        for (int j = begin; j < end; j++) {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        }
    
        int swapTemp = arr[i+1];
        arr[i+1]= arr[end];
        arr[end]= swapTemp;
    
        return i+1;
    }

    private class Scanner {
        String[] s;
        int i;
        BufferedReader br;
        String regex = " ";

        public Scanner() {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        @Override
        protected void finalize() throws Throwable {
            try {
                super.finalize();
            } finally {
                destruction();
            }
        }

        private void destruction() throws IOException {
            if (br != null) br.close();
        }

        public String next() throws IOException {
            if (i < s.length) return s[i++];
            String st = br.readLine();
            while (st == "") st = br.readLine();
            s = st.split(regex, 0);
            i = 0;
            return s[i++];
        }

        public int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(next());
        }

        public Long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(next());
        }

        public Double nextDouble() throws NumberFormatException, IOException {
            return Double.parseDouble(next());
        }
    }
} public class Main {

    private static Scanner sc;

    public static void main(String[] args) {
        Main instance = new Main();
        sc = instance.new Scanner();
        instance.solve();
    }

    private void solve() {
        try {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void quickSort(int arr[], int begin, int end) {
        if (begin < end) {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        }
    }
    
    private int partition(int arr[], int begin, int end) {
        int pivot = arr[end];
        int i = (begin-1);
    
        for (int j = begin; j < end; j++) {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        }
    
        int swapTemp = arr[i+1];
        arr[i+1]= arr[end];
        arr[end]= swapTemp;
    
        return i+1;
    }

    private class Scanner {
        String[] s;
        int i;
        BufferedReader br;
        String regex = " ";

        public Scanner() {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        @Override
        protected void finalize() throws Throwable {
            try {
                super.finalize();
            } finally {
                destruction();
            }
        }

        private void destruction() throws IOException {
            if (br != null) br.close();
        }

        public String next() throws IOException {
            if (i < s.length) return s[i++];
            String st = br.readLine();
            while (st == "") st = br.readLine();
            s = st.split(regex, 0);
            i = 0;
            return s[i++];
        }

        public int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(next());
        }

        public Long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(next());
        }

        public Double nextDouble() throws NumberFormatException, IOException {
            return Double.parseDouble(next());
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {

    private static Scanner sc;

    public static void main(String[] args) {
        Main instance = new Main();
        sc = instance.new Scanner();
        instance.solve();
    }

    private void solve() {
        try {
            int N = sc.nextInt();
            int[] d = new int[N];
            for(int n = 0; n<N; n++) { d[n] = sc.nextInt(); }

            int dan = 0;

            quickSort(d, 0, N-1);

            for(int i=0; i<N; i++) {
                if(i!=0) {
                    if(d[i-1] != d[i]) {
                        dan++;
                    }
                } else {
                    dan++;
                }
            }


            System.out.println(dan);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void quickSort(int arr[], int begin, int end) {
        if (begin < end) {
            int partitionIndex = partition(arr, begin, end);
    
            quickSort(arr, begin, partitionIndex-1);
            quickSort(arr, partitionIndex+1, end);
        }
    }
    
    private int partition(int arr[], int begin, int end) {
        int pivot = arr[end];
        int i = (begin-1);
    
        for (int j = begin; j < end; j++) {
            if (arr[j]<= pivot) {
                i++;
    
                int swapTemp = arr[i];
                arr[i]= arr[j];
                arr[j]= swapTemp;
            }
        }
    
        int swapTemp = arr[i+1];
        arr[i+1]= arr[end];
        arr[end]= swapTemp;
    
        return i+1;
    }

    private class Scanner {
        String[] s;
        int i;
        BufferedReader br;
        String regex = " ";

        public Scanner() {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        @Override
        protected void finalize() throws Throwable {
            try {
                super.finalize();
            } finally {
                destruction();
            }
        }

        private void destruction() throws IOException {
            if (br != null) br.close();
        }

        public String next() throws IOException {
            if (i < s.length) return s[i++];
            String st = br.readLine();
            while (st == "") st = br.readLine();
            s = st.split(regex, 0);
            i = 0;
            return s[i++];
        }

        public int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(next());
        }

        public Long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(next());
        }

        public Double nextDouble() throws NumberFormatException, IOException {
            return Double.parseDouble(next());
        }
    }
}