#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long c[maxn];
int n, k;
bool cap[maxn] = {0};
long long sum = 0;
long long scap[maxn] = {0};
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) scanf("%I64d", &c[i]), sum += c[i];
  int x;
  for (int i = 0; i < k; i++) {
    scanf("%d", &x);
    x--;
    cap[x] = true;
  }
  if (cap[0]) scap[0] = c[0];
  for (int i = 1; i < n; i++) {
    scap[i] = scap[i - 1];
    if (cap[i]) scap[i] += c[i];
  }
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    if (cap[i]) {
      ans += c[i] * (sum - c[(i + 1) % n] - scap[i]);
      if (!cap[(n + i - 1) % n]) ans -= c[i] * c[(n + i - 1) % n];
    }
    ans += c[i] * c[(i + 1) % n];
  }
  cout << ans << endl;
  return 0;
}
