#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 9;
const int MAX_M = 1e6 + 9;
const int MAX_K = 1e6 + 9;
bitset<MAX_N> capital;
long long beauty[MAX_N];
long long totalBeauty = 0;
long long sol = 0;
int n, k;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &beauty[i]);
    totalBeauty += beauty[i];
  }
  int a;
  for (int i = 0; i < k; ++i) {
    scanf("%d", &a);
    capital[a] = true;
  }
  for (int i = 1; i < n; ++i) {
    if (!capital[i] && !capital[i + 1]) sol += beauty[i] * beauty[i + 1];
  }
  if (!capital[n] && !capital[1]) sol += beauty[n] * beauty[1];
  for (int i = 1; i <= n; ++i) {
    if (capital[i]) {
      totalBeauty -= beauty[i];
      sol += totalBeauty * beauty[i];
    }
  }
  printf("%lld", sol);
  return 0;
}
