#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
int n, k;
long long a[100010];
inline int Init() {
  int x = 0;
  char y;
  while ((y = getchar()) < '0' || y > '9')
    ;
  x = y - '0';
  while ((y = getchar()) >= '0' && y <= '9') x = (x << 3) + (x << 1) + y - '0';
  return x;
}
int main() {
  n = Init();
  k = Init();
  long long ans = 0, sum = 0;
  for (int i = 1; i <= n; ++i) a[i] = Init(), sum += a[i];
  for (int i = 1; i < n; ++i) ans += a[i] * a[i + 1];
  ans += a[1] * a[n];
  int t;
  for (int i = 1; i <= k; ++i) {
    t = Init();
    int x = t - 1, y = t + 1;
    if (t == 1) x = n;
    if (t == n) y = 1;
    ans += a[t] * (sum - a[t] - a[x] - a[y]);
    sum -= a[t];
    a[t] = 0;
  }
  cout << ans << endl;
  return 0;
}
