#include <iostream>
int n;
typedef struct ElemType
{
int key;
}ElemType;
struct BSTNode
{
ElemType data;
struct *lchild,*rchild;
}BSTNode,*BSTree;
void InsertBST(BSTree*T,ElemType e)
{
if(!T)
{
BSTree S=new BSTNode;
S->data=e;
S->lchild=S->rchild=NUll;
T=S;
}
if(e.key<T->data.key)
{
InsertBST(T->lchild,e);
}
if(e.key>T->data.key)
{
InsertBST(T->rchild,e);
}
}
int SearchBST(BsTree T,int key)
{
int count=0;
if((!T)||key=T->data.key)
{
count++;
return count;
}
else if(key<T->data.key)return SearchBST(T->lchid,key);
else return SearchBST(T->child,key)
}
int main()
{
int n;
int a[100];
BSTtree *T;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>a[i];
}
for(int i=0;i<n;i++)
{
BSTree(T,a[i]);
}
int BSTASL=0;
for(int i=0;i<n;i++)
{
BSTASL+=SearchBST(T,a[i]);
}
}