#include <bits/stdc++.h>
using namespace std;
int n, k;
long long c[100005];
long long ans, sum;
int id[100005];
int iscap[100005];
int main() {
  ans = 0;
  sum = 0;
  memset(iscap, 0, sizeof(iscap));
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &c[i]);
    sum += c[i];
  }
  for (int i = 0; i < n - 1; i++) ans += c[i] * c[i + 1];
  ans += c[0] * c[n - 1];
  int idd;
  long long tmp = 0;
  long long tmpsum = 0;
  for (int i = 0; i < k; i++) {
    scanf("%d", &idd);
    id[i] = idd - 1;
    iscap[idd - 1] = 1;
    tmpsum += c[id[i]] * tmp;
    tmp += c[id[i]];
  }
  ans -= tmpsum;
  tmp = 0;
  for (int i = 0; i < k; i++) {
    int las, nxt;
    las = (id[i] - 1 + n) % n;
    nxt = (id[i] + 1) % n;
    if (iscap[nxt])
      tmp = sum - c[id[i]] - c[las];
    else
      tmp = sum - c[id[i]] - c[las] - c[nxt];
    ans += c[id[i]] * tmp;
  }
  cout << ans << endl;
  return 0;
}
