#include <bits/stdc++.h>
using namespace std;
int n;
int pos(int i) { return i < n ? i : i - n; }
int main() {
  ios::sync_with_stdio(false);
  int k;
  cin >> n >> k;
  vector<int> c(n);
  vector<bool> ids(n, false);
  unsigned long long s = 0;
  for (int i = 0; i < n; i++) cin >> c[i], s += c[i];
  for (int i = 0; i < k; i++) {
    int t;
    cin >> t;
    ids[--t] = true;
  }
  unsigned long long ans = 0;
  for (int i = 0; i < n; i++) {
    if (ids[pos(i)]) {
      ans += (s - c[pos(i)]) * c[pos(i)];
      s -= c[i];
    } else {
      if (!ids[pos(i + 1)]) ans += c[pos(i)] * c[pos(i + 1)];
    }
  }
  cout << ans;
  return 0;
}
