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