#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, m;
  cin >> n >> m;
  int a[];
  for(int i = 0; i < m; i++){
    int t;
    cin >> t;
    a.push(t);
  }
  lomg int dp[100010];
  for(int i = 0; i < 100010; i++){
    dp[i] = -1;
  }
  dp[0] = 1;
  dp[1] = 1;
  for(int i = 2; i < n; i++){
    if(dp[i] = -1){
      dp[i] = dp[i-1] + dp[i-2];
    }
  }
  cout << dp[n-1] % 1000000007;
}
