It's a holiday down at the farm. You've purchased gifts for the cows and now are trying to choose the perfect gift for each cow. Each cow has given you her wish list for gifts. Each cow will receive exactly one gift. A cow is pleased by her gift only if it appears on her wish list.
Your job is to determine the greatest number of cows that can be pleased given a certain set of gifts to give. The list of gifts might list a gift more than once if more than one was bought.
In this problem, each gift will be designated by an integer in the range 1..1000.
A single line with an integer that tells how many cows can be satisfied by the list of gifts.