#include <bits/stdc++.h>
using namespace std;
long long int res = 0, c[100001], cap[100001], sb = 0, cur, cnt[100001];
int main() {
  int n, k, i;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    scanf("%I64d", &c[i]);
    sb += c[i];
  }
  for (i = 0; i < k; i++) {
    scanf("%I64d", &cap[i]);
    cap[i]--;
  }
  res += c[cap[0]] *
         (sb - c[cap[0]] - c[(cap[0] + n - 1) % n] - c[(cap[0] + 1) % n]);
  sb -= c[cap[0]];
  cnt[cap[0]] = 1;
  for (i = 1; i < k; i++) {
    cur = sb - c[cap[i]];
    if (cnt[(cap[i] + n - 1) % n] == 0) cur -= c[(cap[i] + n - 1) % n];
    if (cnt[(cap[i] + 1) % n] == 0) cur -= c[(cap[i] + 1) % n];
    res += c[cap[i]] * cur;
    sb -= c[cap[i]];
    cnt[cap[i]] = 1;
  }
  for (i = 0; i < n - 1; i++) {
    res += c[i] * c[i + 1];
  }
  res += c[n - 1] * c[0];
  cout << res;
  cout << endl;
  return 0;
}
