#include <bits/stdc++.h>
using namespace std;
long long d[100005];
long long x[100005];
long long mark[100005];
int main() {
  int t;
  int n, k;
  cin >> n >> k;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> d[i];
    sum += d[i];
  }
  long long ans = 0, sx = 0, sq = 0;
  for (int i = 1; i <= k; i++) {
    cin >> x[i];
    mark[x[i]] = 1;
    sx += d[x[i]];
    sq += d[x[i]] * d[x[i]];
  }
  for (int i = 1; i <= k; i++) {
    long long tmp = 0;
    int y;
    if (x[i] == n)
      y = 1;
    else
      y = x[i] + 1;
    if (!mark[y]) tmp += d[y];
    y = x[i] - 1;
    if (x[i] == 1) y = n;
    if (!mark[y]) tmp += d[y];
    ans += d[x[i]] * (sum - tmp - sx);
  }
  ans += ((sx * sx) - sq) / 2;
  if (!mark[n] || !mark[1]) ans += d[n] * d[1];
  for (int i = 2; i <= n; i++) {
    if (!mark[i] || !mark[i - 1]) ans += d[i] * d[i - 1];
  }
  cout << ans << endl;
}
