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();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    }
    System.out.println(dp[n]);
  }
} 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();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    }
    System.out.println(dp[n]);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    }
    System.out.println(dp[n]);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    }
    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 ArrayList<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() int[] a = new int[m]; a new int[m] m for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
      a[i] = sc.nextInt();
      list.add(a[i]);
    } {
      a[i] = sc.nextInt();
      list.add(a[i]);
    } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc list.add(a[i]) list.add list a[i] a i long MOD = (long)Math.pow(10, 9) + 7; MOD (long)Math.pow(10, 9) + 7 (long)Math.pow(10, 9) Math.pow Math 10 9 7 long[] dp = new long[n + 1]; dp new long[n + 1] n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    } list.contains(1) list.contains list 1 {
      dp[1] = 0;
    } dp[1] = 0 dp[1] dp 1 0 {
      dp[1] = 1;
    } dp[1] = 1 dp[1] dp 1 1 for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
      dp[a[i]] = -1;
    } {
      dp[a[i]] = -1;
    } dp[a[i]] = -1 dp[a[i]] dp a[i] a i -1 1 for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    } int i = 2; int i = 2; i 2 i < n + 1 i n + 1 n 1 i++ i++ i {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    } {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    } if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      } dp[i] != -1 dp[i] dp i -1 1 {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      } long c = 0; c 0 long d = 0; d 0 if(dp[i - 1] != -1) c = dp[i - 1]; dp[i - 1] != -1 dp[i - 1] dp i - 1 i 1 -1 1 c = dp[i - 1] c dp[i - 1] dp i - 1 i 1 if(dp[i - 2] != -1) d = dp[i - 2]; dp[i - 2] != -1 dp[i - 2] dp i - 2 i 2 -1 1 d = dp[i - 2] d dp[i - 2] dp i - 2 i 2 dp[i] = (c + d) % MOD dp[i] dp i (c + d) % MOD (c + d) c d MOD System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    }
    System.out.println(dp[n]);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    }
    System.out.println(dp[n]);
  }
} 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();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    }
    System.out.println(dp[n]);
  }
}