Zoo#2226

Zoo

1 second
128 megabytes
Easy

The city zoo contains different species of animals. To participate in the international exhibition "Three critters," the zoo must present three animals, each of a different species. The zookeepers want to know in how many ways they can choose three animals to participate in the exhibition.

For example, if the zoo has two bears, a tiger, a lion, and a penguin, then there are seven ways to choose three animals:

  1. first bear, tiger, and lion;

  2. first bear, tiger, and penguin;

  3. first bear, lion, and penguin;

  4. second bear, tiger, and lion;

  5. second bear, tiger, and penguin;

  6. second bear, lion, and penguin;

  7. tiger, lion, and penguin.

Input

The first line contains the number of animal species (1 \le n \le 10^5) in the city zoo. Each of the following lines contains one positive integer—the number of animals of the corresponding species. The total number of animals in the zoo does not exceed 10^5.

Output

Print the number of ways to choose three animals for the international exhibition.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading