#include <bits/stdc++.h>
using namespace std;
const int N = 100050;
int n, k, c[N], s, id[N], ss;
bool cp[N];
long long ans = 0, w;
int main() {
  int i, x;
  long long q;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; ++i) scanf("%d", &c[i]), s += c[i];
  for (i = 2; i <= n; ++i) ans += c[i] * c[i - 1];
  ans += c[1] * c[n];
  for (i = 1; i <= k; ++i)
    scanf("%d", &id[i]), ss += c[id[i]], cp[id[i]] = true;
  s -= ss;
  for (i = 1; i <= k; ++i) {
    q = (long long)s;
    if (!cp[(id[i] + 1 == n + 1 ? 1 : id[i] + 1)])
      q -= c[(id[i] + 1 == n + 1 ? 1 : id[i] + 1)];
    if (!cp[(id[i] - 1 == 0 ? n : id[i] - 1)])
      q -= c[(id[i] - 1 == 0 ? n : id[i] - 1)];
    ans += q * c[id[i]];
  }
  for (i = 1; i <= k; ++i) {
    q = (long long)ss;
    if (cp[(id[i] + 1 == n + 1 ? 1 : id[i] + 1)])
      q -= c[(id[i] + 1 == n + 1 ? 1 : id[i] + 1)];
    if (cp[(id[i] - 1 == 0 ? n : id[i] - 1)])
      q -= c[(id[i] - 1 == 0 ? n : id[i] - 1)];
    w += (q - c[id[i]]) * c[id[i]];
  }
  cout << ans + w / 2 << endl;
  return 0;
}
