#include <bits/stdc++.h>
using namespace std;
int n, k;
const int maxn = 100100;
long long int c[maxn];
bool vis[maxn];
long long int p1[maxn];
long long int p2[maxn];
long long int sum = 0;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> c[i];
  }
  p2[n - 1] = c[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    p2[i] = p2[i + 1] + c[i];
  }
  p1[0] = c[0];
  for (int i = 1; i < n; i++) {
    p1[i] = p1[i - 1] + c[i];
  }
  long long int tmp = 0;
  for (int i = 0; i < k; i++) {
    int cur;
    cin >> cur;
    cur--;
    vis[cur] = 1;
    if (cur + 1 < n) {
      sum += (c[cur] * p2[cur + 1]);
    }
    if (cur - 1 >= 0) {
      sum += (c[cur] * (p1[cur - 1] - tmp));
    }
    tmp += c[cur];
  }
  for (int i = 0; i < n; i++) {
    if (!vis[i] && !vis[(i + 1) % n]) {
      sum += (c[i] * c[(i + 1) % n]);
    }
  }
  cout << sum << endl;
  return 0;
}
