407201: GYM102697 172 Snowball Fight
Description
You're tired of the warm July weather, so you and your friends decide to take a trip to Antarctica, and have a snowball fight.
Each person is given a very large number of snowballs (essentially, an infinite number). Each person is also wearing a coat with a certain color, and boots with a certain color.
Throughout the snowball fight, each person throws their snowballs at everyone else who doesn't either have the same color of coat, or the same color of boots, exactly once. Obviously, people don't throw snowballs at themselves.
Given this information, figure out how many snowballs are thrown in total during the snowball fight.
InputThe first line of input consists of a single positive integer $$$n$$$: the number of people involved in the snowball fight.
The next line of input consists of $$$n$$$ space-separated strings: the coat color of each person involved in the snowball fight, in order.
The next line of input consists of $$$n$$$ space-separated strings: the boot color of each person involved in the snowball fight, in order.
OutputOutput a single positive integer $$$n$$$: the total number of snowballs that are thrown during the snowball fight.
ExamplesInput5 red red green green blue red blue yellow green greenOutput
14Input
5 red red green yellow purple brown blue maroon pink orangeOutput
18