#include <bits/stdc++.h>
using namespace std;
long long fib(long long n) {
  if (n == 0 || n == 1) {
    return 1;
  } else {
    return fib(n - 1) + fib(n - 2);
  }
}
int main() {
  int N, M;
  long long c = 0;
  int pre = 1;
  cin >> N >> M;
  int a, b;
  if (M != 0) {
    for (int i = (0), iformax = (M); i < iformax; i++) {
      cin >> a;
      if (a == pre && pre != 1) {
        c = 0;
        break;
      } else {
        b = a - pre;
        c += fib(b);
        pre = a + 1;
      }
    }
    if (c == 0) {
      cout << 0 << endl;
    } else {
      b = N - pre;
      c += fib(b);
      cout << c % 1000000007 << endl;
    }
  } else {
    c = fib(N);
    cout << c % 1000000007 << endl;
  }
}
