#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 7, NN = 1e9 + 5;
long long n, k, i, ii, a[N], bb, b[N], ans, s;
int main() {
  scanf("%lld%lld", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    s += a[i];
  }
  for (i = 0; i < k; i++) {
    scanf("%lld", &bb);
    b[bb - 1] = 1;
  }
  for (i = 0; i < n; i++) {
    if (b[i]) {
      s -= a[i];
      ans = ans + a[i] * s;
      if (b[(i + n - 1) % n] == 0) ans = ans - a[i] * a[(i + n - 1) % n];
    } else
      ans = ans + a[i] * a[(i + 1) % n];
  }
  printf("%lld\n", ans);
}
