#include <bits/stdc++.h>
using namespace std;
long long a[200000];
long long cap[200000];
int main() {
  long long n, k;
  long long ans = 0;
  long long sum = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < k; i++) {
    cin >> cap[i];
    cap[i]--;
  }
  for (int i = 0; i < n; i++) {
    ans += (a[i] * a[(i + 1) % n]);
    sum += a[i];
  }
  long long pre = 0;
  for (int i = 0; i < k; i++) {
    if (cap[i] == 0)
      ans += ((sum - a[1] - a[n - 1] - a[0] - pre) * a[0]);
    else if (cap[i] == n - 1)
      ans += ((sum - a[0] - a[n - 2] - a[n - 1] - pre) * a[n - 1]);
    else
      ans +=
          ((sum - a[cap[i] - 1] - a[cap[i] + 1] - a[cap[i]] - pre) * a[cap[i]]);
    if (i > 0 && cap[i] == cap[i - 1] + 1) ans += (a[cap[i]] * a[cap[i] - 1]);
    pre += a[cap[i]];
  }
  if (cap[0] == 0 && cap[k - 1] == n - 1) ans += (a[0] * a[n - 1]);
  cout << ans << endl;
  return 0;
}
