#include <bits/stdc++.h>
using namespace std;
long long INF = 1e12;
long long M = 1E9 + 7;
int MAXN = 123456;
double PI = 2 * acos(0);
int mod(int val, int n) {
  if (val < 0)
    return n - abs(val);
  else
    return val % n;
}
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  int n, k;
  cin >> n >> k;
  long long a = 0, b = 0, s1 = 0, s2 = 0;
  vector<long long> c(n);
  vector<bool> cap(n, false);
  for (long long i = 0; i < n; i++) cin >> c[i];
  for (long long i = 0; i < k; i++) {
    int v;
    cin >> v;
    v--;
    cap[v] = true;
  }
  for (long long i = 0; i < n; i++) {
    if (!cap[i] && !cap[mod(i + 1, n)]) s1 += c[i] * c[mod(i + 1, n)];
  }
  for (long long i = 0; i < n; i++) {
    if (cap[i])
      a += c[i];
    else
      b += c[i];
  }
  s1 += a * b;
  for (long long i = 0; i < n; i++) {
    if (cap[i]) {
      s2 += (c[i] * (a - c[i]));
    }
  }
  s2 /= 2;
  cout << s1 + s2 << "\n";
  return 0;
}
