#include <bits/stdc++.h>
using namespace std;
bool cap[100006];
int normal[100005];
int capitals[100005];
int main() {
  int n, k, i, j, x;
  long long sum = 0, sum_capital = 0, ans = 0;
  scanf("%d %d", &n, &k);
  for (i = 1; i <= n; i++) scanf("%d", &normal[i]), sum += normal[i];
  for (i = 1; i <= k; i++) {
    scanf("%d", &capitals[i]);
    sum_capital += normal[capitals[i]];
    cap[i] = true;
  }
  sum -= sum_capital;
  for (i = 1; i <= k; i++) {
    x = normal[capitals[i]];
    ans = ans + (x * sum);
    sum_capital -= x;
    ans = ans + (x * sum_capital);
  }
  for (i = 1; i <= k; i++) normal[capitals[i]] = 0;
  normal[n + 1] = normal[1];
  for (i = 1; i <= n; i++) {
    x = normal[i] * normal[i + 1];
    ans += x;
  }
  cout << ans << endl;
  return 0;
}
