A tree with n nodes numbered from 1 to n is represented by
the parent array t, where t[i] is the parent of node i, and
t[i] = 0 means that node i is the root of the tree.
A node is called a leaf if it has no direct descendants, i.e.,
if it never appears as a value in the parent array (ignoring the value 0).
Write a program that reads n and the values of the parent array, and
prints the number of leaves in the tree.