using System;

public class ABC129C {
  public static void Main(string[] args) {
    var str = Console.ReadLine().Split();
    int n = int.Parse(str[0]);
    int m = int.Parse(str[1]);
    int[] a = new int[m];
    long[] dp = new long[n+1];
    long mod = 1000000007;
    
    for (int i = 0; i < n+1; i++) {
      dp[i] = 100001;
    }
    
    dp[0] = 1;
    dp[1] = 1;
    
    for (int i = 0; i < m; i++) {
      var str2 = Console.ReadLine();
      a[i] = int.Parse(str2);
      dp[a[i]] = 0;
    }
    
    for (int i = 2; i < n+1; i++) {
      if (dp[i] == 0) {
        continue;
      }else {
        dp[i] = dp[i-1] + dp[i-2];
      }
    }
    
    Console.WriteLine(dp[n] % mod);
        
  }
}