#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T SQR(T x) {
  return x * x;
}
template <typename T>
inline T MIN(T x, T y) {
  return (x < y) ? x : y;
}
template <typename T>
inline T MAX(T x, T y) {
  return (x > y) ? x : y;
}
template <typename T>
inline void UPDATE_MIN(T& x, T y) {
  if (y < x) {
    x = y;
  }
}
template <typename T>
inline void UPDATE_MAX(T& x, T y) {
  if (x < y) {
    x = y;
  }
}
template <typename T>
inline int ARGMAX(T cont) {
  return max_element(cont.begin(), cont.end()) - cont.begin();
}
template <typename T>
inline int ARGMIN(T cont) {
  return min_element(cont.begin(), cont.end()) - cont.begin();
}
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.emplace_back(x);
  return move(v);
}
template <typename T, typename... Args>
inline string arrStr(T arr, int n) {
  stringstream s;
  s << "[";
  for (__typeof(n - 1) i = (0), __tmpvar__end60 = (n - 1); i < __tmpvar__end60;
       i++)
    s << arr[i] << ",";
  s << arr[n - 1] << "]";
  return s.str();
}
template <class T>
inline string TOSTR(const T& x) {
  stringstream ss;
  ss << x;
  return ss.str();
}
inline int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
inline long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
inline long long powmod(long long a, long long p, long long m) {
  long long r = 1;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
struct pairhash {
  template <typename T, typename U>
  std::size_t operator()(const std::pair<T, U>& x) const {
    return std::hash<T>()(x.first) ^ std::hash<U>()(x.second);
  }
};
template <typename K, typename V>
V GetWithDef(const std::unordered_map<K, V>& m, const K& key, const V& defval) {
  auto it = m.find(key);
  return (it == m.end()) ? defval : it->second;
}
template <typename K, typename V>
void SetDef(std::unordered_map<K, V>& m, const K& key, const V& defval) {
  auto it = m.find(key);
  if (it == m.end()) m[key] = defval;
}
const int MOD = 1000 * 1000 * 1000 + 7;
const double PI = 3.1415926535897932384626433832795l;
int N, M;
int dist_sum[200123] = {};
int dist[200123] = {};
int cnt[200123] = {};
int curcnt[200123] = {};
long long ans = -31337;
long long onedist = -1;
long long different_distances = 0;
void die() {
  cout << -1 << endl;
  exit(0);
}
void copy() {
  for (__typeof(N) i = (0), __tmpvar__end160 = (N); i < __tmpvar__end160; i++) {
    curcnt[i] = cnt[i];
  }
}
void add_answer(long long dist) {
  1;
  if (ans == -31337) {
    ans = dist;
  } else if (ans != dist) {
    die();
  }
}
void add_dist(long long dist) {
  1;
  if (onedist == -1)
    onedist = dist;
  else if (onedist != dist)
    different_distances = 1;
}
void check(int start, int dx, int pathlen, long long resdist) {
  copy();
  1;
  int pos = start;
  for (__typeof(pathlen) i = (0), __tmpvar__end181 = (pathlen);
       i < __tmpvar__end181; i++) {
    if (curcnt[pos] <= 0) return;
    curcnt[pos]--;
    if (pos == 0) dx = 1;
    if (pos == N - 1) dx = -1;
    if (i != pathlen - 1) {
      if (dx == 1) {
        resdist += dist[pos];
      } else {
        resdist += dist[pos - 1];
      }
      pos += dx;
    }
  }
  1;
  add_answer(resdist);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> N;
  int base_dist;
  cin >> base_dist;
  dist_sum[0] = 0;
  for (__typeof(N) i = (1), __tmpvar__end207 = (N); i < __tmpvar__end207; i++) {
    cin >> dist_sum[i];
    dist_sum[i] -= base_dist;
    dist[i - 1] = dist_sum[i] - dist_sum[i - 1];
    add_dist(dist[i - 1]);
  }
  long long pathlen = 0;
  cin >> M;
  for (__typeof(M) i = (0), __tmpvar__end219 = (M); i < __tmpvar__end219; i++) {
    int pos;
    cin >> pos;
    cnt[pos - 1]++;
    pathlen++;
  }
  for (__typeof(N) i = (0), __tmpvar__end225 = (N); i < __tmpvar__end225; i++) {
    1;
  }
  int nlaps = pathlen / (2 * N - 2);
  int all_zero = 1;
  int all_one = 1;
  for (__typeof(N) i = (0), __tmpvar__end229 = (N); i < __tmpvar__end229; i++) {
    if (i == 0 || i == N - 1)
      cnt[i] -= nlaps;
    else
      cnt[i] -= nlaps * 2;
    all_zero &= (cnt[i] == 0);
    all_one &= (cnt[i] == 1);
  }
  pathlen -= nlaps * (2 * N - 2);
  1;
  long long pathdist = nlaps * 1ll * dist_sum[N - 1] * 2ll;
  if (all_zero) {
    if (different_distances) die();
    cout << (pathdist - dist[0]) << endl;
    return 0;
  }
  if (all_one) {
    cout << (pathdist + dist_sum[N - 1]) << endl;
    return 0;
  }
  check(0, 1, pathlen, pathdist);
  check(1, 1, pathlen, pathdist);
  check(1, -1, pathlen, pathdist);
  check(N - 1, -1, pathlen, pathdist);
  check(N - 2, 1, pathlen, pathdist);
  check(N - 2, -1, pathlen, pathdist);
  check(N / 2, -1, pathlen, pathdist);
  check(N / 2, 1, pathlen, pathdist);
  int mxcnt = -1;
  for (__typeof(N) i = (0), __tmpvar__end258 = (N); i < __tmpvar__end258; i++)
    UPDATE_MAX(mxcnt, cnt[i]);
  int onerunned = 0;
  for (__typeof(N - 2) i = (2), __tmpvar__end261 = (N - 2);
       i < __tmpvar__end261; i++) {
    if (cnt[i] == mxcnt && cnt[i - 1] < cnt[i]) {
      check(i, -1, pathlen, pathdist);
      check(i, 1, pathlen, pathdist);
    }
    if (cnt[i] == mxcnt && cnt[i + 1] < cnt[i]) {
      check(i, 1, pathlen, pathdist);
      check(i, -1, pathlen, pathdist);
    }
    if (cnt[i] == mxcnt && onerunned < 10) {
      check(i, 1, pathlen, pathdist);
      check(i, -1, pathlen, pathdist);
      onerunned++;
    }
  }
  cout << ans << endl;
  return 0;
}
