In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length li.

Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that maximizes their total area. Each stick is used in making at most one rectangle, it is possible that some of sticks remain unused. Bending sticks is not allowed.

Sticks with lengths a1, a2, a3 and a4 can make a rectangle if the following properties are observed:

  * a1 ≤ a2 ≤ a3 ≤ a4
  * a1 = a2
  * a3 = a4



A rectangle can be made of sticks with lengths of, for example, 3 3 3 3 or 2 2 4 4. A rectangle cannot be made of, for example, sticks 5 5 5 7.

Ilya also has an instrument which can reduce the length of the sticks. The sticks are made of a special material, so the length of each stick can be reduced by at most one. For example, a stick with length 5 can either stay at this length or be transformed into a stick of length 4.

You have to answer the question — what maximum total area of the rectangles can Ilya get with a file if makes rectangles from the available sticks?

Input

The first line of the input contains a positive integer n (1 ≤ n ≤ 105) — the number of the available sticks.

The second line of the input contains n positive integers li (2 ≤ li ≤ 106) — the lengths of the sticks.

Output

The first line of the output must contain a single non-negative integer — the maximum total area of the rectangles that Ilya can make from the available sticks.

Examples

Input

4
2 4 4 2


Output

8


Input

4
2 2 3 5


Output

0


Input

4
100003 100004 100005 100006


Output

10000800015
/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Submission
{
	public static void main (String[] args) throws java.lang.Exception
	{
		MyScanner sc = new MyScanner();
      	out = new PrintWriter(new BufferedOutputStream(System.out));
		BigInteger counter  = new BigInteger("0");
		int n = sc.nextInt();
		int[] array = new int[n];
		for(int i = 0;i<n;i++){
			array[i] = sc.nextInt();
		}
		quickSort(array,0,n-1);
		boolean checked = false;
		for(int i = n-1; i>2; i--){
			if(array[i] == 0) continue;
			for(int j = i-1; j>1; j-- ){
				if(checked) break;
				if(array[j] == 0) continue;
				if(array[i]-array[j]>1) break;
				
				if(array[i]-array[j]==1 || array[i]-array[j]==0){
					for(int k = j-1; k>0; k--){
						if(checked) break;
						if(array[k] == 0) continue;
						for(int m = k-1; m>=0; m--){
							if(checked) break;
							if(array[m] == 0) continue;
							if(array[k]-array[m]>1) break;
							if(array[k]-array[m]==1 || array[k]-array[m]==0){
								//long current = array[m]*array[j];
								if(array[i]!=0&&array[k]!=0&&
									array[j]!=0&&array[m]!=0)
								{	
								BigInteger current = new BigInteger("0");
								current = current.add(BigInteger.valueOf(array[m]));
								current = current.multiply(BigInteger.valueOf(array[j]));
								array[k] = 0;
								array[i] = 0;
								array[j] = 0;
								array[m] = 0;
								counter = counter.add(current);
								checked = true;
								}
							}
					
						}
					}
					
				}
				
			}
			checked = false;
		}
		out.println(counter.toString());
		out.close();
		
	}
	
	
	
	
	  

   //-----------PrintWriter for faster output---------------------------------
   public static PrintWriter out;
      
   //-----------MyScanner class for faster input----------
   public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
	
	
	
	
	
	
	
	
	
	
	public static void quickSort(int[] arr, int low, int high) {
 
		if (arr == null || arr.length == 0)
			return;
 
		if (low >= high)
			return;
 
		//pick the pivot
		int middle = low + (high - low) / 2;
		int pivot = arr[middle];
 
		//make left < pivot and right > pivot
		int i = low, j = high;
		while (i <= j) {
			while (arr[i] < pivot) {
				i++;
			}
 
			while (arr[j] > pivot) {
				j--;
			}
 
			if (i <= j) {
				int temp = arr[i];
				arr[i] = arr[j];
				arr[j] = temp;
				i++;
				j--;
			}
		}
 
		//recursively sort two sub parts
		if (low < j)
			quickSort(arr, low, j);
 
		if (high > i)
			quickSort(arr, i, high);
	}
}