#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, s = 0;
  long long r = 0;
  cin >> n >> k;
  vector<long long> c(n);
  vector<long long> id(k);
  int a[n];
  for (int i = 0; i < n; i++) a[i] = 0;
  for (int i = 0; i < n; i++) {
    cin >> c[i];
    s += c[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> id[i];
    a[id[i] - 1] = 1;
    s -= c[id[i] - 1];
    r += s * c[id[i] - 1];
  }
  for (int i = 0; i < n; i++) {
    if (!a[i % n] && !a[(i + 1) % n]) {
      r += c[i % n] * c[(i + 1) % n];
    }
  }
  cout << r << endl;
  return 0;
}
