// editor4
#include<stdio.h>
#include<stdlib.h>
typedef struct TreeNode{
    int data;
    struct TreeNode *left;
    struct TreeNode *right;
}node;
Node*root=NULL;
Node *create(int num){
    Node *newnode=(Node*)malloc(sizeof(Node));
    newnode->data=num;
    newnode->left=newnode->right=NULL;
    return newnode;
}
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->left=insertBST(root->right,num);
    }
    return root;
}

int countNodes(Node*root){
    if(root==NULL){
        return 0;
    }
    return 1 + countNodes(root->left)+countNodes(root->right);
}
int main(){
    int size,tar,num,i;
    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");
            return 0;
        }
        root=insertBST(root,num);
    }
    printf("%d",countNodes(root));
    return 0;
}