#include <bits/stdc++.h>
using namespace std;
long long n, k;
long long b[100005];
long long cap[100005];
set<long long> capid;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k;
  long long i, j;
  long long sum = 0;
  long long ans = 0;
  for (i = 1; i <= n; i++) {
    cin >> b[i];
    sum += b[i];
  }
  for (i = 1; i <= k; i++) {
    cin >> cap[i];
    capid.insert(cap[i]);
  }
  for (i = 1; i <= k; i++) {
    sum -= b[cap[i]];
    ans += (sum * b[cap[i]]);
  }
  for (i = 1; i <= n - 1; i++) {
    if (capid.find(i + 1) == capid.end() && capid.find(i) == capid.end()) {
      ans += (b[i] * b[i + 1]);
    }
  }
  if (capid.find(1) == capid.end() && capid.find(n) == capid.end()) {
    ans += (b[1] * b[n]);
  }
  cout << ans << endl;
  return 0;
}
