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();

    Map<Integer, Long> memo = new HashMap<>();
    Set<Integer> broken = new HashSet<>();
    int[] a = new int[M];
    for (int i = 0; i < M; i++) {
      broken.add(sc.nextInt());
    }
    
    long ans = func(0, N, broken, memo);
    
    System.out.println(ans);
  }
  
  private static long func(int n, int N, Set<Integer> broken,
                          Map<Integer, Long> memo) {

    if (broken.contains(n) || N < n) {
      return 0;
    }
    if (n == N) {
      return 1;
    }
    Long cache = memo.get(n);
    if (cache != null) {
      return cache;
    }
    
    long value = func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007;
    memo.put(n, value % 1000000007);

    return value % 1000000007;
  }
} 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();

    Map<Integer, Long> memo = new HashMap<>();
    Set<Integer> broken = new HashSet<>();
    int[] a = new int[M];
    for (int i = 0; i < M; i++) {
      broken.add(sc.nextInt());
    }
    
    long ans = func(0, N, broken, memo);
    
    System.out.println(ans);
  }
  
  private static long func(int n, int N, Set<Integer> broken,
                          Map<Integer, Long> memo) {

    if (broken.contains(n) || N < n) {
      return 0;
    }
    if (n == N) {
      return 1;
    }
    Long cache = memo.get(n);
    if (cache != null) {
      return cache;
    }
    
    long value = func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007;
    memo.put(n, value % 1000000007);

    return value % 1000000007;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();

    Map<Integer, Long> memo = new HashMap<>();
    Set<Integer> broken = new HashSet<>();
    int[] a = new int[M];
    for (int i = 0; i < M; i++) {
      broken.add(sc.nextInt());
    }
    
    long ans = func(0, N, broken, memo);
    
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();

    Map<Integer, Long> memo = new HashMap<>();
    Set<Integer> broken = new HashSet<>();
    int[] a = new int[M];
    for (int i = 0; i < M; i++) {
      broken.add(sc.nextInt());
    }
    
    long ans = func(0, N, broken, memo);
    
    System.out.println(ans);
  } 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 Map<Integer, Long> memo = new HashMap<>(); memo new HashMap<>() Set<Integer> broken = new HashSet<>(); broken new HashSet<>() int[] a = new int[M]; a new int[M] M for (int i = 0; i < M; i++) {
      broken.add(sc.nextInt());
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      broken.add(sc.nextInt());
    } {
      broken.add(sc.nextInt());
    } broken.add(sc.nextInt()) broken.add broken sc.nextInt() sc.nextInt sc long ans = func(0, N, broken, memo); ans func(0, N, broken, memo) func 0 N broken memo System.out.println(ans) System.out.println System.out System System.out ans String[] args args private static long func(int n, int N, Set<Integer> broken,
                          Map<Integer, Long> memo) {

    if (broken.contains(n) || N < n) {
      return 0;
    }
    if (n == N) {
      return 1;
    }
    Long cache = memo.get(n);
    if (cache != null) {
      return cache;
    }
    
    long value = func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007;
    memo.put(n, value % 1000000007);

    return value % 1000000007;
  } func {

    if (broken.contains(n) || N < n) {
      return 0;
    }
    if (n == N) {
      return 1;
    }
    Long cache = memo.get(n);
    if (cache != null) {
      return cache;
    }
    
    long value = func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007;
    memo.put(n, value % 1000000007);

    return value % 1000000007;
  } if (broken.contains(n) || N < n) {
      return 0;
    } broken.contains(n) || N < n broken.contains(n) broken.contains broken n N < n N n {
      return 0;
    } return 0; 0 if (n == N) {
      return 1;
    } n == N n N {
      return 1;
    } return 1; 1 Long cache = memo.get(n); cache memo.get(n) memo.get memo n if (cache != null) {
      return cache;
    } cache != null cache null {
      return cache;
    } return cache; cache long value = func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007; value func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007 func(n+1, N, broken, memo) % 1000000007 func(n+1, N, broken, memo) func n+1 n 1 N broken memo 1000000007 func(n+2, N, broken, memo) % 1000000007 func(n+2, N, broken, memo) func n+2 n 2 N broken memo 1000000007 memo.put(n, value % 1000000007) memo.put memo n value % 1000000007 value 1000000007 return value % 1000000007; value % 1000000007 value 1000000007 int n n int N N Set<Integer> broken broken Map<Integer, Long> memo memo public class Main {
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();

    Map<Integer, Long> memo = new HashMap<>();
    Set<Integer> broken = new HashSet<>();
    int[] a = new int[M];
    for (int i = 0; i < M; i++) {
      broken.add(sc.nextInt());
    }
    
    long ans = func(0, N, broken, memo);
    
    System.out.println(ans);
  }
  
  private static long func(int n, int N, Set<Integer> broken,
                          Map<Integer, Long> memo) {

    if (broken.contains(n) || N < n) {
      return 0;
    }
    if (n == N) {
      return 1;
    }
    Long cache = memo.get(n);
    if (cache != null) {
      return cache;
    }
    
    long value = func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007;
    memo.put(n, value % 1000000007);

    return value % 1000000007;
  }
} public class Main {
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();

    Map<Integer, Long> memo = new HashMap<>();
    Set<Integer> broken = new HashSet<>();
    int[] a = new int[M];
    for (int i = 0; i < M; i++) {
      broken.add(sc.nextInt());
    }
    
    long ans = func(0, N, broken, memo);
    
    System.out.println(ans);
  }
  
  private static long func(int n, int N, Set<Integer> broken,
                          Map<Integer, Long> memo) {

    if (broken.contains(n) || N < n) {
      return 0;
    }
    if (n == N) {
      return 1;
    }
    Long cache = memo.get(n);
    if (cache != null) {
      return cache;
    }
    
    long value = func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007;
    memo.put(n, value % 1000000007);

    return value % 1000000007;
  }
} 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();

    Map<Integer, Long> memo = new HashMap<>();
    Set<Integer> broken = new HashSet<>();
    int[] a = new int[M];
    for (int i = 0; i < M; i++) {
      broken.add(sc.nextInt());
    }
    
    long ans = func(0, N, broken, memo);
    
    System.out.println(ans);
  }
  
  private static long func(int n, int N, Set<Integer> broken,
                          Map<Integer, Long> memo) {

    if (broken.contains(n) || N < n) {
      return 0;
    }
    if (n == N) {
      return 1;
    }
    Long cache = memo.get(n);
    if (cache != null) {
      return cache;
    }
    
    long value = func(n+1, N, broken, memo) % 1000000007
      + func(n+2, N, broken, memo) % 1000000007;
    memo.put(n, value % 1000000007);

    return value % 1000000007;
  }
}