#include <stdio.h>
#include <stdlib.h>

typedef struct TreeNode{
    int data; 
    struct TreeNode *left;
    struct TreeNode *right;
}Node;

Node *create(int num){
    Node *newnode=(Node*)malloc(sizeof(Node));
    
    newnode->data = num;
    newnode->left = newnode->right=NULL;
    return newnode;
}

Node *searchBST(Node *root, int num){
    if(root == NULL) return 0;
    if(root->data == num) return 1;
    if(num < root->data) return searBST(root->left, num);
    else return searchBST(root->right, num);
}

Node *insertBST(Node *root, int num){
    if(root==NULL){
        return create(num);
    }
    if(num<root->data){
        root->left=insertBST(root->left, num);
    }
    else if (num > root->data){
        root->right=insertBST(root->right, num);
    }
    return root;
    
}


int main(){
    int size, num, count=0;
    Node* root=NULL;
    scanf("%d", &size);
    if(size<0){
        printf("Invalid input");
        return 0;
    }
    for(int i=0; i<size; i++){
        scanf("%d", &num);
        if(num<0){
            printf("Invalid input");
        }else{
            if(!searchBST(root, num)){
                root=insertBST(root, num);
                count++;
            }
        }
    }
    printf("%d", count);
    return 0;
}