#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int v[500002], a[500005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, t, rez = 0;
  cin >> n >> t;
  v[0] = -(1 << 30);
  v[n + 1] = (1 << 30);
  a[0] = 0;
  a[t + 1] = n + 1;
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = 1; i <= t; i++) cin >> a[i];
  for (int i = 0; i <= t; i++) {
    int st = a[i], dr = a[i + 1];
    int est = v[st] - st, edr = v[dr] - dr;
    int dist = dr - st - 1;
    if (est > edr) {
      cout << -1;
      return 0;
    }
    vector<int> arr;
    for (int j = st + 1; j < dr; j++) {
      int el = v[j] - j;
      if (est > el || el > edr) continue;
      vector<int>::iterator it = upper_bound(arr.begin(), arr.end(), el);
      if (it == arr.end())
        arr.push_back(el), dist--;
      else
        *it = el;
    }
    rez += dist;
  }
  cout << rez;
  return 0;
}
