Ghazu uses a social networking site almost all the time. He was wondering what are Friends of Friends in that social networking site? If “X” is his friend, and “Y” is X’s friend but “Y” is not his friend, then “Y” is called his friend of friend. You have to find how many friends of friends Ghazu has. (Each user in that social networking site has a unique 4-digit ID number)
Input
First line contains a integer “N” (1<=N<=100) the number of friends in Ghazu's Profile. Then follow N lines. First Integer in each line is the ID number of Ghazu's friend, then an integer “M” (1<=M<=100) is the number of people in his friend list. Then follow M integers in that line, denoting the ID number of friends in his friend list (excluding Ghazu).
Output
Output a single integer denoting Ghazu's number of friends of friends.