#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[100005];
  a[0] = 0;
  a[1] = 1;
  for (int i = 0; i < 100002; i++) {
    a[i + 2] =
        (a[i + 1] + a[i]) % (10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 + 7);
  }
  long long n, m;
  cin >> n >> m;
  long long cant[m];
  for (int i = 0; i < m; i++) {
    cin >> cant[i];
  }
  long long ans = (a[n - cant[m - 1]] * a[cant[0]]) %
                  (10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 + 7);
  for (int i = 0; i < m - 1; i++) {
    ans = (ans * a[cant[i + 1] - cant[i] - 1]) %
          (10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 + 7);
  }
  cout << ans;
}
