#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
string toString(T x) {
  stringstream sout;
  sout << x;
  return sout.str();
}
int nextInt() {
  int a;
  scanf("%d", &a);
  return a;
}
double nextDouble() {
  double a;
  scanf("%lf", &a);
  return a;
}
string nextString() {
  string s;
  cin >> s;
  return s;
}
long long nextLong() {
  long long x;
  cin >> x;
  return x;
}
void initFiles() {}
long long m;
long long n;
int a[200500];
int c[200500];
int main() {
  initFiles();
  cin >> n;
  for (int i = 0; i < (n); i++) scanf("%d", &a[i]);
  cin >> m;
  for (int i = 0; i < (m); i++) c[nextInt() - 1]++;
  for (int i = (n)-1; i >= 0; i--) a[i] -= a[0];
  int f = 1;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i + 1] - a[i] != a[1]) f = 0;
  }
  if (f) {
    cout << (long long)a[1] * (m - 1) << endl;
    return 0;
  }
  long long ans = 0;
  while (m > 2 * n - 2) {
    for (int i = 0; i < (n); i++) {
      if (i && i < n - 1)
        c[i] -= 2;
      else
        c[i]--;
    }
    m -= 2 * n - 2;
    ans += 2 * a[n - 1];
  }
  if (c[0] && c[n - 1]) {
    if (m == 2 * n - 2) {
      cout << -1 << endl;
      return 0;
    }
    ans += 2 * a[n - 1];
    int l = 0;
    for (int i = 1; i < n - 1; i++)
      if (c[i] < 2) {
        l = i - 1;
        break;
      }
    int r = n - 1;
    for (int i = n - 2; i > 0; i--)
      if (c[i] < 2) {
        r = i + 1;
        break;
      }
    ans -= a[r] - a[l];
  } else if (!c[0] && !c[n - 1]) {
    if (m > 1) {
      int l = 1;
      for (int i = 1; i < n - 1; i++)
        if (c[i]) {
          l = i;
          break;
        }
      int r = n - 2;
      for (int i = n - 2; i > 0; i--)
        if (c[i]) {
          r = i;
          break;
        }
      ans += a[r] - a[l];
    }
  } else if (c[0] && !c[n - 1]) {
    int r1 = 0, r2 = 0;
    for (int i = 1; i < n - 1; i++) {
      if (c[i]) r2 = i;
      if (c[i] > 1) r1 = i;
    }
    ans += a[r1] + a[r2];
  } else {
    int l1 = n - 1, l2 = n - 1;
    for (int i = n - 2; i >= 0; i--) {
      if (c[i]) l2 = i;
      if (c[i] > 1) l1 = i;
    }
    ans += a[n - 1] - a[l1] + a[n - 1] - a[l2];
  }
  cout << ans << endl;
  return 0;
}
