#include <bits/stdc++.h>
using namespace std;
int a[100000];
int b[100000];
int main() {
  int n, k;
  long long sum;
  long long sum2;
  while (scanf("%d %d", &n, &k) != EOF) {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    sum = 0;
    sum2 = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      if (i >= 1) sum = sum + a[i] * a[i - 1];
      sum2 += a[i];
    }
    sum = sum + a[0] * a[n - 1];
    int m;
    for (int i = 0; i < k; i++) {
      scanf("%d", &m);
      m--;
      b[m]++;
      if (m != 0 && m != n - 1 && (b[m - 1] == 0) && b[m + 1] == 0)
        sum =
            sum + a[m] * sum2 - a[m] * a[m] - a[m] * a[m - 1] - a[m] * a[m + 1];
      if (m != 0 && m != n - 1 && (b[m - 1] != 0) && b[m + 1] == 0)
        sum = sum + a[m] * sum2 - a[m] * a[m] - a[m] * a[m + 1];
      if (m != 0 && m != n - 1 && (b[m - 1] != 0) && b[m + 1] != 0)
        sum = sum + a[m] * sum2 - a[m] * a[m];
      if (m != 0 && m != n - 1 && (b[m - 1] == 0) && b[m + 1] != 0)
        sum = sum + a[m] * sum2 - a[m] * a[m] - b[m - 1] * b[m];
      if (m == 0 && b[n - 1] == 0 && b[1] == 0)
        sum =
            sum + a[m] * sum2 - a[m] * a[m + 1] - a[m] * a[n - 1] - a[m] * a[m];
      if (m == 0 && b[n - 1] != 0 && b[1] == 0)
        sum = sum + a[m] * sum2 - a[m] * a[m + 1] - a[m] * a[m];
      if (m == 0 && b[n - 1] == 0 && b[1] != 0)
        sum = sum + a[m] * sum2 - a[m] * a[n - 1] - a[m] * a[m];
      if (m == 0 && b[n - 1] != 0 && b[1] != 0)
        sum = sum + a[m] * sum2 - a[m] * a[m];
      if (m == n - 1 && b[n - 2] == 0 && b[0] == 0)
        sum = sum + a[m] * sum2 - a[m - 1] * a[m] - a[m] * a[m] - a[0] * a[m];
      if (m == n - 1 && b[n - 2] != 0 && b[0] == 0)
        sum = sum + a[m] * sum2 - a[m] * a[m] - a[0] * a[m];
      if (m == n - 1 && b[n - 2] == 0 && b[0] != 0)
        sum = sum + a[m] * sum2 - a[m - 1] * a[m] - a[m] * a[m];
      if (m == n - 1 && b[n - 2] != 0 && b[0] != 0)
        sum = sum + a[m] * sum2 - a[m] * a[m];
      sum2 -= a[m];
    }
    printf("%I64d\n", sum);
  }
}
