#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 10;
int n, k;
long long b[MAX];
bool c[MAX];
int main() {
  scanf("%d%d", &n, &k);
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%I64d", b + i);
    sum += b[i];
  }
  memset(c, false, sizeof(c));
  for (int i = 0; i < k; i++) {
    int x;
    scanf("%d", &x);
    x--;
    c[x] = true;
  }
  long long res = 0, scap = 0;
  for (int i = 0; i < n; i++) {
    if (c[i]) {
      scap += b[i];
      res += b[i] * (sum - scap);
    } else if (i > 0 && !c[i - 1])
      res += b[i] * b[i - 1];
  }
  if (!c[0] && !c[n - 1]) res += b[0] * b[n - 1];
  printf("%I64d", res);
}
