import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    final int modder=1000000007;
    int n=sc.nextInt();
    int m=sc.nextInt();
    Deque<Integer> h=new ArrayDeque<>(m);
    for(int i=0;i<m;i++){
      h.addLast(sc.nextInt());
    }
    int dp[]=new int[n+1+2];
    Arrays.fill(dp,0);
    dp[0]=1;
    for(int i=0;i<=n;i++){
      if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      }
    }
    System.out.println(dp[n]);
  }
} import java.util.*; util.* java class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    final int modder=1000000007;
    int n=sc.nextInt();
    int m=sc.nextInt();
    Deque<Integer> h=new ArrayDeque<>(m);
    for(int i=0;i<m;i++){
      h.addLast(sc.nextInt());
    }
    int dp[]=new int[n+1+2];
    Arrays.fill(dp,0);
    dp[0]=1;
    for(int i=0;i<=n;i++){
      if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      }
    }
    System.out.println(dp[n]);
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    final int modder=1000000007;
    int n=sc.nextInt();
    int m=sc.nextInt();
    Deque<Integer> h=new ArrayDeque<>(m);
    for(int i=0;i<m;i++){
      h.addLast(sc.nextInt());
    }
    int dp[]=new int[n+1+2];
    Arrays.fill(dp,0);
    dp[0]=1;
    for(int i=0;i<=n;i++){
      if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      }
    }
    System.out.println(dp[n]);
  } main {
    Scanner sc = new Scanner(System.in);
    final int modder=1000000007;
    int n=sc.nextInt();
    int m=sc.nextInt();
    Deque<Integer> h=new ArrayDeque<>(m);
    for(int i=0;i<m;i++){
      h.addLast(sc.nextInt());
    }
    int dp[]=new int[n+1+2];
    Arrays.fill(dp,0);
    dp[0]=1;
    for(int i=0;i<=n;i++){
      if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      }
    }
    System.out.println(dp[n]);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int modder=1000000007; modder 1000000007 int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int m=sc.nextInt(); m sc.nextInt() sc.nextInt sc Deque<Integer> h=new ArrayDeque<>(m); h new ArrayDeque<>(m) for(int i=0;i<m;i++){
      h.addLast(sc.nextInt());
    } int i=0; int i=0; i 0 i<m i m i++ i++ i {
      h.addLast(sc.nextInt());
    } {
      h.addLast(sc.nextInt());
    } h.addLast(sc.nextInt()) h.addLast h sc.nextInt() sc.nextInt sc int dp[]=new int[n+1+2]; dp new int[n+1+2] n+1+2 n+1+2 n 1 2 Arrays.fill(dp,0) Arrays.fill Arrays dp 0 dp[0]=1 dp[0] dp 0 1 for(int i=0;i<=n;i++){
      if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      }
    } int i=0; int i=0; i 0 i<=n i n i++ i++ i {
      if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      }
    } {
      if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      }
    } if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      } h.peekFirst()!=null&&h.peekFirst()==i h.peekFirst()!=null h.peekFirst() h.peekFirst h null h.peekFirst()==i h.peekFirst() h.peekFirst h i {
        h.pollFirst();
        dp[i]=0;
      } h.pollFirst() h.pollFirst h dp[i]=0 dp[i] dp i 0 {
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      } dp[i+1]=(dp[i+1]+dp[i])%modder dp[i+1] dp i+1 i 1 (dp[i+1]+dp[i])%modder (dp[i+1]+dp[i]) dp[i+1] dp i+1 i 1 dp[i] dp i modder dp[i+2]=(dp[i+2]+dp[i])%modder dp[i+2] dp i+2 i 2 (dp[i+2]+dp[i])%modder (dp[i+2]+dp[i]) dp[i+2] dp i+2 i 2 dp[i] dp i modder System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n String args[] args
import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    final int modder=1000000007;
    int n=sc.nextInt();
    int m=sc.nextInt();
    Deque<Integer> h=new ArrayDeque<>(m);
    for(int i=0;i<m;i++){
      h.addLast(sc.nextInt());
    }
    int dp[]=new int[n+1+2];
    Arrays.fill(dp,0);
    dp[0]=1;
    for(int i=0;i<=n;i++){
      if(h.peekFirst()!=null&&h.peekFirst()==i){
        h.pollFirst();
        dp[i]=0;
      }else{
        dp[i+1]=(dp[i+1]+dp[i])%modder;
        dp[i+2]=(dp[i+2]+dp[i])%modder;
      }
    }
    System.out.println(dp[n]);
  }
}