C. Sweet Selections
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Vargas has opened a new ice cream stand on the shores of New Atlantis, for all the tourists to enjoy. For the small price of 14.99 spuds, customers get two scoops of ice cream (which may be different flavors), their choice of a drizzle, and their choice of a topping.

Vargas has seen many interesting combinations of desserts, and is curious to know – given a particular day's selection of flavors, drizzles, and toppings, how many possible (distinct) ice cream cones could be served?

Note that the order of the scoops does not matter.

Input

The first line contains a list of space-separated words, representing the flavors of ice cream. There will be at least 1 and at most 100 flavors.

The second line contains another list of space-separated words, representing the available drizzles. There will be at least 1 and at most 100 drizzles.

The third line contains yet another list of space-separated words, representing the available toppings. There will be at least 1 and at most 100 toppings.

All flavors, drizzles, and toppings will be distinct.

Output

Output a single integer, the number of possible desserts. Note that customers must purchase exactly two scoops (which may or may not be the same flavor), one drizzle, and one topping.

The order of the scoops does not matter.

Example
Input
Grass Licorice
Motor-Oil
Bone-Dust
Output
3
Note

There are three possible ice cream cones in this first example. They are:

  1. Grass, Grass, Motor-Oil, Bone-Dust
  2. Grass, Licorice, Motor-Oil, Bone-Dust. Note that this is the same as Licorice, Grass, Motor-Oil, Bone-Dust.
  3. Licorice, Licorice, Motor-Oil, Bone-Dust