#include <stdio.h>
int map[501][501]={};
int len[501]={};
void ton(int m)
{
len [m]==1;
for(int i=2; i<=500; i++)
{
if(map[m][i]==1)
{
map[m][i]=0;
map[i][m]=0;
}
}
}
int main()
{
int a,b,c,n,s=0;
scanf("%d", &c);
for(int i=0; i<=c; i++)
{
scanf("%d %d" , &a,&b);
map[a][b]=1;
}
s=n;
printf("%d",s);
return 0;
}