#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
int n;
long long x[100010];
bool v[100010];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%I64d", &x[i]);
  sort(x, x + n);
  long long a = -1, b = -1;
  long long ret = 0;
  for (int i = n - 2; i >= 0; i--) {
    if (v[i + 1]) continue;
    if (x[i + 1] - x[i] <= 1) {
      if (a == -1) {
        a = x[i];
        v[i] = true;
      } else {
        b = x[i];
        v[i] = true;
        ret += a * b;
        a = -1;
      }
    }
  }
  cout << ret << endl;
  return 0;
}
