import java.util.*;
import java.io.*;

public class Main
{
  final int mod = (int)1e9+7;
  int n, m;
  boolean[] a;
  int[] dp;
  
  Main(Scanner in, PrintWriter out)
  {
	n = in.nextInt();
    m = in.nextInt();
    a = new boolean[n+2];
    for (int i = 0; i < m; i++)
      a[in.nextInt()] = true;
    dp = new int[n];
    Arrays.fill(dp, -1);
    out.println(dp(0));
  }
  
  int dp(int at)
  {
    if (at == n) return 1;
    if (at > n) return 0;
    if (dp[at] != -1) return dp[at];
    int cnt = 0;
    if (!a[at+1]) cnt += dp(at+1);
    cnt %= mod;
    if (!a[at+2]) cnt += dp(at+2);
    cnt %= mod;
    return dp[at] = cnt % mod;
  }

  public static void main(String[] args)
  {
    Scanner in = new Scanner(System.in);
    PrintWriter out = new PrintWriter(System.out);
    new	Main(in, out);
    out.close();
  } 
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz