#include <bits/stdc++.h>
using namespace std;
long long int a[1000007];
long long int b[1000007];
int main() {
  int m, p;
  scanf("%d %d", &m, &p);
  int i;
  for (i = 0; i < m; i++) scanf("%lld", a + i);
  long long int ans = 0;
  long long int anss = 0;
  long long int ansss = 0;
  for (i = 0; i < m; i++)
    ans = ans + (a[i] * a[(i + 1) % m]), anss = anss + a[i];
  for (i = 0; i < p; i++) scanf("%lld", b + i), b[i]--;
  sort(b, b + p);
  for (i = 0; i < p; i++) {
    ans = ans + a[b[i]] * (anss - a[b[i]]);
    ans = ans - a[b[i]] * ansss;
    ans = ans - a[b[i]] * (a[(b[i] + m - 1) % m] + a[(b[i] + 1) % m]);
    if (lower_bound(b, b + i, (b[i] + m - 1) % m) != b + i &&
        *lower_bound(b, b + i, (b[i] + m - 1) % m) == (b[i] + m - 1) % m)
      ans = ans + a[b[i]] * a[(b[i] + m - 1) % m];
    if (lower_bound(b, b + i, (b[i] + 1) % m) != b + i &&
        *lower_bound(b, b + i, (b[i] + 1) % m) == (b[i] + 1) % m)
      ans = ans + a[b[i]] * a[(b[i] + 1) % m];
    ansss = ansss + a[b[i]];
  }
  printf("%lld\n", ans);
  return 0;
}
