#include <bits/stdc++.h>
using namespace std;
long long int c[100010], sum;
int mark[100010];
int main() {
  ios_base::sync_with_stdio(false);
  int n, k, id;
  long long int ans = 0;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> c[i];
    sum += c[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> id;
    if (id < n)
      mark[id] = mark[id + 1] = 1;
    else
      mark[id] = mark[1] = 1;
    sum -= c[id];
    ans += sum * c[id];
  }
  for (int i = 2; i <= n; i++) {
    if (!mark[i]) ans += c[i] * c[i - 1];
  }
  if (!mark[1]) ans += c[1] * c[n];
  cout << ans << "\n";
  return 0;
}
