#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int maxn = 1e5 + 4;
const int maxm = 1e6 + 4;
long long num[maxn], n, m;
bool capital[maxn];
int main() {
  ios::sync_with_stdio(false);
  int i, j, k, kase;
  cin >> n >> m;
  long long sum = 0;
  for (i = 1; i <= n; ++i) {
    cin >> num[i];
    sum += num[i];
  }
  long long t = 0;
  for (i = 0; i < m; ++i) {
    int pos;
    cin >> pos;
    capital[pos] = true;
    t += num[pos];
  }
  for (i = 1; i <= 2; ++i) num[i + n] = num[i], capital[i + n] = capital[i];
  unsigned long long ans = 0;
  for (i = 2; i <= n + 1; ++i) {
    if (capital[i])
      ans += (sum - num[i]) * num[i];
    else {
      ans += num[i] * t;
      if (!capital[i - 1]) ans += num[i] * num[i - 1];
      if (!capital[i + 1]) ans += num[i] * num[i + 1];
    }
  }
  cout << ans / 2 << endl;
  return 0;
}
