#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long a[100100] = {0};
  bool sp[100100] = {0};
  long long ans = 0;
  long long sum = 0;
  cin >> a[1];
  sum += a[1];
  for (long long i = 2; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  long long sumk = 0;
  for (long long i = 1; i <= k; i++) {
    long long d;
    cin >> d;
    sp[d] = true;
    sumk += a[d];
  }
  if (n == 1) {
    cout << 0 << endl;
    exit(0);
  }
  if (n == 2) {
    cout << a[1] * a[2] << endl;
    exit(0);
  }
  long long y;
  for (long long i = 1; i <= n; i++) {
    if (sp[i]) {
      ans += a[i] * (sum - a[i]);
    } else {
      if (i == 1) {
        ans += a[1] * a[2] + a[1] * a[n];
        y = sumk;
        if (sp[2]) y = y - a[2];
        if (sp[n]) y = y - a[n];
        ans += a[1] * y;
      } else if (i == n) {
        ans += a[n] * a[n - 1] + a[n] * a[1];
        y = sumk;
        if (sp[1]) y = y - a[1];
        if (sp[n - 1]) y = y - a[n - 1];
        ans += a[n] * y;
      } else {
        ans += a[i] * a[i - 1] + a[i] * a[i + 1];
        y = sumk;
        if (sp[i - 1]) y = y - a[i - 1];
        if (sp[i + 1]) y = y - a[i + 1];
        ans += a[i] * y;
      }
    }
  }
  cout << ans / 2 << endl;
  return 0;
}
