#include <bits/stdc++.h>
using namespace std;
int c[100010], d[100010];
long long ans = 0, t = 0, p = 0;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", c + i);
  for (int i = 2; i <= n; i++) p += c[i];
  for (int i = 0; i < k; i++) {
    int a;
    scanf("%d", &a);
    d[a] = 1;
    t += c[a];
  }
  if (d[1]) t -= c[1];
  for (int i = 1; i < n; i++) {
    ans += 1LL * c[i] * c[i + 1];
    if (d[i + 1]) t -= c[i + 1];
    p -= c[i + 1];
    if (d[i])
      ans += 1LL * c[i] * p;
    else
      ans += 1LL * c[i] * t;
  }
  if (!d[1] && !d[n]) ans += 1LL * c[1] * c[n];
  cout << ans << endl;
}
