#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long freq[n];
  memset(freq, 0, sizeof freq);
  for (int i = 0; i < k; i++) {
    long long x;
    cin >> x;
    freq[x - 1] = 1;
  }
  long long sum1 = 0, sum2 = 0;
  for (int i = 0; i < n; i++) {
    if (freq[i])
      sum1 += a[i];
    else
      sum2 += a[i];
  }
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    if (freq[i])
      ans += a[i] * (sum1 + sum2 - a[i]);
    else {
      ans += a[i] * sum1;
      if (!freq[(i - 1 + n) % n]) ans += a[i] * a[(i - 1 + n) % n];
      if (!freq[(i + 1) % n]) ans += a[i] * a[(i + 1) % n];
    }
  }
  cout << ans / 2 << endl;
  return 0;
}
