import java.util.*;
public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[] a = new int[m];
      int[] dp = new int[n+3];
      Set<Integer> set = new HashSet<Integer>();
      for(int i = 0;i < m;i++){
        a[i] = sc.nextInt();
        set.add(a[i]);
      }
      dp[0] = 0;
      if(set.contains(1)){
        dp[1]=0;
      }else dp[1]=1;
      if(set.contains(2)){
      	dp[2]=0;
      }else dp[2] = dp[1]+1;
      for(int i = 3;i <= n;i++){
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      }
      System.out.println(dp[n]);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[] a = new int[m];
      int[] dp = new int[n+3];
      Set<Integer> set = new HashSet<Integer>();
      for(int i = 0;i < m;i++){
        a[i] = sc.nextInt();
        set.add(a[i]);
      }
      dp[0] = 0;
      if(set.contains(1)){
        dp[1]=0;
      }else dp[1]=1;
      if(set.contains(2)){
      	dp[2]=0;
      }else dp[2] = dp[1]+1;
      for(int i = 3;i <= n;i++){
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      }
      System.out.println(dp[n]);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[] a = new int[m];
      int[] dp = new int[n+3];
      Set<Integer> set = new HashSet<Integer>();
      for(int i = 0;i < m;i++){
        a[i] = sc.nextInt();
        set.add(a[i]);
      }
      dp[0] = 0;
      if(set.contains(1)){
        dp[1]=0;
      }else dp[1]=1;
      if(set.contains(2)){
      	dp[2]=0;
      }else dp[2] = dp[1]+1;
      for(int i = 3;i <= n;i++){
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      }
      System.out.println(dp[n]);
    } main {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[] a = new int[m];
      int[] dp = new int[n+3];
      Set<Integer> set = new HashSet<Integer>();
      for(int i = 0;i < m;i++){
        a[i] = sc.nextInt();
        set.add(a[i]);
      }
      dp[0] = 0;
      if(set.contains(1)){
        dp[1]=0;
      }else dp[1]=1;
      if(set.contains(2)){
      	dp[2]=0;
      }else dp[2] = dp[1]+1;
      for(int i = 3;i <= n;i++){
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      }
      System.out.println(dp[n]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] a = new int[m]; a new int[m] m int[] dp = new int[n+3]; dp new int[n+3] n+3 n 3 Set<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for(int i = 0;i < m;i++){
        a[i] = sc.nextInt();
        set.add(a[i]);
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        a[i] = sc.nextInt();
        set.add(a[i]);
      } {
        a[i] = sc.nextInt();
        set.add(a[i]);
      } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc set.add(a[i]) set.add set a[i] a i dp[0] = 0 dp[0] dp 0 0 if(set.contains(1)){
        dp[1]=0;
      }else dp[1]=1; set.contains(1) set.contains set 1 {
        dp[1]=0;
      } dp[1]=0 dp[1] dp 1 0 dp[1]=1 dp[1] dp 1 1 if(set.contains(2)){
      	dp[2]=0;
      }else dp[2] = dp[1]+1; set.contains(2) set.contains set 2 {
      	dp[2]=0;
      } dp[2]=0 dp[2] dp 2 0 dp[2] = dp[1]+1 dp[2] dp 2 dp[1]+1 dp[1] dp 1 1 for(int i = 3;i <= n;i++){
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      } int i = 3; int i = 3; i 3 i <= n i n i++ i++ i {
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      } {
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      } if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007; set.contains(i) set.contains set i dp[i]=0 dp[i] dp i 0 dp[i]=(dp[i-1]+dp[i-2])%1000000007 dp[i] dp i (dp[i-1]+dp[i-2])%1000000007 (dp[i-1]+dp[i-2]) dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 1000000007 System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n String[] args args public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    } lcm {
      return x*y/gcd(x,y);
    } return x*y/gcd(x,y); x*y/gcd(x,y) x*y x y gcd(x,y) gcd x y int x x int y y public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    } gcd {
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    } if(x < y)return gcd(y,x); x < y x y return gcd(y,x); gcd(y,x) gcd y x if(y==0)return x; y==0 y 0 return x; x return gcd(y,x%y); gcd(y,x%y) gcd y x%y x y int x x int y y public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[] a = new int[m];
      int[] dp = new int[n+3];
      Set<Integer> set = new HashSet<Integer>();
      for(int i = 0;i < m;i++){
        a[i] = sc.nextInt();
        set.add(a[i]);
      }
      dp[0] = 0;
      if(set.contains(1)){
        dp[1]=0;
      }else dp[1]=1;
      if(set.contains(2)){
      	dp[2]=0;
      }else dp[2] = dp[1]+1;
      for(int i = 3;i <= n;i++){
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      }
      System.out.println(dp[n]);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[] a = new int[m];
      int[] dp = new int[n+3];
      Set<Integer> set = new HashSet<Integer>();
      for(int i = 0;i < m;i++){
        a[i] = sc.nextInt();
        set.add(a[i]);
      }
      dp[0] = 0;
      if(set.contains(1)){
        dp[1]=0;
      }else dp[1]=1;
      if(set.contains(2)){
      	dp[2]=0;
      }else dp[2] = dp[1]+1;
      for(int i = 3;i <= n;i++){
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      }
      System.out.println(dp[n]);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[] a = new int[m];
      int[] dp = new int[n+3];
      Set<Integer> set = new HashSet<Integer>();
      for(int i = 0;i < m;i++){
        a[i] = sc.nextInt();
        set.add(a[i]);
      }
      dp[0] = 0;
      if(set.contains(1)){
        dp[1]=0;
      }else dp[1]=1;
      if(set.contains(2)){
      	dp[2]=0;
      }else dp[2] = dp[1]+1;
      for(int i = 3;i <= n;i++){
      	if(set.contains(i)) dp[i]=0;
        else dp[i]=(dp[i-1]+dp[i-2])%1000000007;
      }
      System.out.println(dp[n]);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
}