#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(m);
  for (int i = 0; i < (m); i++) cin >> a[i];
  vector<int> dp(n + 1);
  dp[0] = dp[1] = 1;
  for (int i = 2; i < n + 1; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= MOD;
  }
  cout << dp[n];
}
