#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  long long capsum = 0;
  vector<int> arr(n);
  int i, j;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    capsum += arr[i];
  }
  vector<int> cap(k + 1);
  cap[k] = n + 1;
  for (i = 0; i < k; i++) {
    cin >> cap[i];
    cap[i]--;
  }
  long long ans = 0;
  j = 0;
  for (i = 0; i < n; i++) {
    if (i == cap[j]) {
      j++;
      capsum -= arr[i];
      ans += arr[i] * capsum;
      continue;
    }
    if (i == 0) {
      if (cap[k - 1] != n - 1) ans += (arr[0] * arr[n - 1]);
    } else if (i == n - 1) {
      if (cap[k - 1] != n - 2) ans += (arr[n - 1] * arr[n - 2]);
    } else {
      if (cap[j - 1] != i - 1) ans += (arr[i] * arr[i - 1]);
    }
  }
  cout << ans << endl;
}
