#include <bits/stdc++.h>
using namespace std;
bool v[100000], iscapital[100000];
int main() {
  long long n, k, res = 0, c[100000], x[100000], s, sum = 0, sum_cap = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> c[i];
    sum += c[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> x[i];
    iscapital[x[i] - 1] = true;
    sum_cap += c[x[i] - 1];
  }
  for (int i = 0; i < n; i++) {
    if (iscapital[i]) {
      res += ((sum - c[i]) * c[i]);
    } else {
      if (i == 0) {
        if (!iscapital[n - 1]) res += c[0] * c[n - 1];
      } else if (!iscapital[i - 1])
        res += c[i] * c[i - 1];
      if (i == n - 1) {
        if (!iscapital[0]) res += c[0] * c[n - 1];
      } else if (!iscapital[i + 1])
        res += c[i] * c[i + 1];
      res += sum_cap * c[i];
    }
  }
  cout << res / 2 << endl;
  return 0;
}
