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();
  } 
} import java.util.*; util.* java import java.io.*; io.* java 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();
  } 
} Main final int mod = (int)1e9+7; mod (int)1e9+7 (int)1e9 7 int n n m; m boolean[] a; a int[] dp; 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));
  } Main {
	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));
  } n = in.nextInt() n in.nextInt() in.nextInt in m = in.nextInt() m in.nextInt() in.nextInt in a = new boolean[n+2] a new boolean[n+2] n+2 n 2 for (int i = 0; i < m; i++)
      a[in.nextInt()] = true; int i = 0; int i = 0; i 0 i < m i m i++ i++ i a[in.nextInt()] = true; a[in.nextInt()] = true a[in.nextInt()] a in.nextInt() in.nextInt in true dp = new int[n] dp new int[n] n Arrays.fill(dp, -1) Arrays.fill Arrays dp -1 1 out.println(dp(0)) out.println out dp(0) dp 0 Scanner in in PrintWriter out out 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;
  } dp {
    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;
  } if (at == n) return 1; at == n at n return 1; 1 if (at > n) return 0; at > n at n return 0; 0 if (dp[at] != -1) return dp[at]; dp[at] != -1 dp[at] dp at -1 1 return dp[at]; dp[at] dp at int cnt = 0; cnt 0 if (!a[at+1]) cnt += dp(at+1); !a[at+1] a[at+1] a at+1 at 1 cnt += dp(at+1) cnt dp(at+1) dp at+1 at 1 cnt %= mod cnt mod if (!a[at+2]) cnt += dp(at+2); !a[at+2] a[at+2] a at+2 at 2 cnt += dp(at+2) cnt dp(at+2) dp at+2 at 2 cnt %= mod cnt mod return dp[at] = cnt % mod; dp[at] = cnt % mod dp[at] dp at cnt % mod cnt mod int at at public static void main(String[] args)
  {
    Scanner in = new Scanner(System.in);
    PrintWriter out = new PrintWriter(System.out);
    new	Main(in, out);
    out.close();
  } main {
    Scanner in = new Scanner(System.in);
    PrintWriter out = new PrintWriter(System.out);
    new	Main(in, out);
    out.close();
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) new	Main(in, out) out.close() out.close out String[] args args 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();
  } 
} 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();
  } 
} Main
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();
  } 
}
