#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const long long MOD = 1000000007;
const double PI = acos(-1.);
const double eps = 1e-9;
long long modPow(long long a, long long b, long long MOD) {
  long long ret = 1;
  for (; b; b >>= 1) {
    if (b & 1) ret = ret * a % MOD;
    a = a * a % MOD;
  }
  return ret;
}
const int MXN = 100005;
int c[MXN];
int v[MXN];
void solve() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = (0); i < (int)(n); i++) scanf("%d", &c[i]), v[i] = 0;
  ;
  for (int i = (0); i < (int)(k); i++) {
    int t;
    scanf("%d", &t);
    v[t - 1] = 1;
  }
  long long sum = 0;
  for (int i = (0); i < (int)(n); i++) sum += v[i] * c[i];
  long long all = 0;
  for (int i = (0); i < (int)(n); i++) all += c[i];
  long long ans = 0;
  for (int i = (0); i < (int)(n); i++)
    if (v[i])
      ans += c[i] * (all - c[i]);
    else
      ans += c[i] * sum;
  for (int i = (0); i < (int)(n); i++)
    if (!v[i] && !v[(i + 1) % n]) ans += 2LL * c[i] * c[(i + 1) % n];
  ans /= 2;
  cout << ans << "\n";
}
int main() {
  int _T = 1;
  for (int CA = (0); CA < (int)(_T); CA++) {
    solve();
  }
  return 0;
}
