// editor4
#include <stdio.h>
#include <stdlib.h>
typedef struct TreeNode {
    int data;
    struct TreeNode *left;
    struct TreeNode *right;
}Node;
Node* createNode(int value) {
    Node* node = (Node*)malloc(sizeof(Node));
    node->data = value;
    node->left = NULL;
    node->right = NULL;
    return node;
}
Node* insert(Node* root, int value) {
    if (root == NULL)
        return createNode(value);

    if (value < root->data)
        root->left = insert(root->left, value);
    else if(value>root->data)
        root->right = insert(root->right, value);

    return root;
}
int countNodes(Node* root) {
    if (root == NULL)
        return 0;
    return 1+countNodes(root->left) + countNodes(root->right);
}
int main() {
    int N, X, value;
    Node* root = NULL;

    
    

    
    //scanf("%d", &X);
    scanf("%d", &N)

    
    if (N <=0 ) {
        printf("Invalid input");
        return 0;
    }

   
    for (int i = 0; i < N; i++) {
       scanf("%d", &value)
        if( value<0){
            printf("Invalid input");
            return 0;
        }
        
        root = insert(root, value);
    }

    
    //root = insert(root, X);
    printf("%d",countNodes(root));
    return 0;
}