#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<long long> V(n);
  long long total = 0;
  for (int i = 0; i < n; ++i) {
    cin >> V[i];
    total += V[i];
  }
  map<int, int> M;
  for (int i = 0; i < k; ++i) {
    int aux;
    cin >> aux;
    M[aux - 1]++;
  }
  long long ans = 0, capitals = 0;
  for (int i = 0; i < n; ++i) {
    long long cur = V[i], next = V[(i + 1) % n], last = V[(i - 1 + n) % n];
    if (M[i]) {
      capitals += cur;
      ans += cur * total;
      ans -= cur * capitals;
      if (!M[(i - 1 + n) % n]) {
        ans -= cur * last;
      }
    } else {
      ans += cur * next;
    }
  }
  cout << ans << "\n";
  return 0;
}
