#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k, x, su = 0, ans = 0;
  cin >> n >> k;
  long long arr[n + 5];
  for (long long i = 1; i < n + 1; i += 1) {
    cin >> arr[i];
    su += arr[i];
  }
  set<long long> s;
  for (long long i = 1; i < k + 1; i += 1) {
    cin >> x;
    s.insert(x);
  }
  if (!(((s).find(1) != (s).end()) || ((s).find(n) != (s).end())))
    ans += arr[1] * arr[n];
  for (long long i = 1; i < n; i++) {
    if (((s).find(i) != (s).end()) || ((s).find(i + 1) != (s).end()))
      continue;
    else
      ans += arr[i] * arr[i + 1];
  }
  set<long long>::iterator it;
  for (it = s.begin(); it != s.end(); it++) {
    long long c = *it;
    ans += (su - arr[c]) * arr[c];
    su -= arr[c];
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
