#include <bits/stdc++.h>
using namespace std;
const int siz = 5e5 + 10;
const int SIZ = 1e6 + 10;
const int mod = 1e9 + 7;
const int maxx = 2e9;
const int MAXX = 1e18;
const string file = "1";
int a[siz], b[siz];
int lis_size(int l, int r) {
  vector<int> len;
  for (int i = l + 1; i <= r - 1; i++) {
    if (a[l] <= a[i] && a[i] <= a[r]) {
      auto it = upper_bound((len).begin(), (len).end(), a[i]);
      if (it == len.end()) {
        len.push_back(a[i]);
      } else {
        *it = a[i];
      }
    }
  }
  return (int)(len).size();
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
  }
  for (int i = 1; i <= n; i++) {
    a[i] -= i;
  }
  a[0] = -maxx, a[n + 1] = maxx;
  b[0] = 0, b[m + 1] = n + 1;
  int ans = 0;
  for (int i = 1; i <= m + 1; i++) {
    int l = b[i - 1], r = b[i];
    if (a[l] > a[r]) {
      return cout << -1 << "\n", 0;
    }
    ans += ((r - l - 1) - lis_size(l, r));
  }
  cout << ans << "\n";
  return 0;
}
