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