#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <class T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
inline int nxt() {
  int wow;
  scanf("%d", &wow);
  return wow;
}
inline long long int lxt() {
  long long int wow;
  scanf("%lld", &wow);
  return wow;
}
long long int a[100002], c[100002], hit[100002];
int main() {
  int n = nxt(), k = nxt();
  long long int temp = 0;
  for (int i = 1; i <= n; i++) {
    a[i] = lxt();
    temp += a[i];
  }
  long long int sum = 0, d = 0;
  for (int i = 1; i <= k; i++) {
    long long int x = lxt();
    d += a[x];
    hit[x] = 1;
    c[i] = x;
  }
  for (int i = 1; i <= k; i++) {
    long long int x = c[i];
    long long int y = temp - a[x];
    sum += y * a[x];
    if (x == 1) {
      sum -= a[1] * a[n];
      sum -= a[1] * a[2];
    } else if (x == n) {
      sum -= a[n] * a[n - 1];
      sum -= a[n] * a[1];
    } else {
      sum -= a[x] * a[x - 1];
      sum -= a[x] * a[x + 1];
    }
  }
  long long int p = 0, beshi = 0;
  for (int i = 1; i < n; i++) {
    p += a[i] * a[i + 1];
  }
  p += a[1] * a[n];
  for (int i = 1; i <= k; i++) {
  }
  double ans = sum + p;
  long long int f = 0;
  for (int i = 1; i <= k; i++) {
    long long int x = c[i];
    f += (d - a[x]) * a[x];
  }
  for (int i = 1; i < k; i++) {
    if (c[i] == c[i + 1] - 1) {
      f -= (a[c[i]] * a[c[i + 1]]) * 2;
    }
  }
  if (k >= 3) {
    if (c[1] == 1 && c[k] == n) f -= (a[1] * a[n]) * 2;
  }
  cout << sum + p - f / 2 << endl;
  return 0;
}
