#include <bits/stdc++.h>
using namespace std;
int n, m, k, d[100100];
long long c[100100];
bool x[100100];
int main() {
  int i, j;
  long long ans = 0, p = 0;
  scanf("%d", &n);
  scanf("%d", &k);
  for (i = 1; i <= n; i++) {
    scanf("%lld", &c[i]);
    p += c[i];
  }
  for (i = 1; i <= k; i++) {
    scanf("%d", &d[i]);
    x[d[i]] = 1;
  }
  for (i = 1; i <= n; i++) {
    ans += (c[i] * (p - c[i]));
  }
  ans /= 2;
  long long pp = 0;
  p = 0;
  for (i = 1; i <= n; i++) {
    if (x[i] == 0) {
      p += c[i];
      pp += c[i] * c[i];
    }
  }
  p *= p;
  p -= pp;
  p /= 2;
  for (i = 1; i < n; i++) {
    if (x[i] == 0 && x[i + 1] == 0) {
      ans += c[i] * c[i + 1];
    }
  }
  if (x[1] == 0 && x[n] == 0) ans += c[1] * c[n];
  ans -= p;
  cout << ans;
}
