#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long s = 0;
  bool f = 0;
  char ch = ' ';
  while (!isdigit(ch)) {
    f |= (ch == '-');
    ch = getchar();
  }
  while (isdigit(ch)) {
    s = (s << 3) + (s << 1) + (ch ^ 48);
    ch = getchar();
  }
  return (f) ? (-s) : (s);
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x < 10) {
    putchar(x + '0');
    return;
  }
  write(x / 10);
  putchar((x % 10) + '0');
}
const int N = 200005;
int n, m, a[N], dis[N], b[N];
int main() {
  int i, x;
  bool limit = 1, flg;
  long long jyl = 0;
  n = read();
  a[0] = 0;
  for (i = 1; i <= n; i++) a[i] = read(), dis[i] = a[i] - a[i - 1];
  m = read();
  for (i = 1; i <= m; i++)
    x = read(), b[x]++, b[x] += (x == 1 || x == n) ? 1 : 0;
  for (i = 2; i <= n; i++) limit &= (b[i] == b[i - 1]);
  if (limit) {
    flg = 1;
    for (i = 2; i <= n - 1 && flg; i++) flg &= (dis[i] == dis[i + 1]);
    jyl = (long long)(1ll * (a[n] - a[1]) * b[1] - dis[2]);
    write((flg) ? jyl : -1), putchar('\n');
  } else {
    for (i = 2; i <= n; i++)
      jyl = 1ll * (jyl + 1ll * dis[i] * min(b[i], b[i - 1]));
    write(jyl), putchar('\n');
  }
  return 0;
}
