import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = Integer.parseInt(sc.next());
    int brokenStair;
    int[] stair = new int[n];
    if(n == 1) {
      System.out.println(1);
    } else {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = Integer.parseInt(sc.next());
    int brokenStair;
    int[] stair = new int[n];
    if(n == 1) {
      System.out.println(1);
    } else {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = Integer.parseInt(sc.next());
    int brokenStair;
    int[] stair = new int[n];
    if(n == 1) {
      System.out.println(1);
    } else {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = Integer.parseInt(sc.next());
    int brokenStair;
    int[] stair = new int[n];
    if(n == 1) {
      System.out.println(1);
    } else {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int brokenStair; brokenStair int[] stair = new int[n]; stair new int[n] n if(n == 1) {
      System.out.println(1);
    } else {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    } n == 1 n 1 {
      System.out.println(1);
    } System.out.println(1) System.out.println System.out System System.out 1 {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    } Arrays.fill(stair, -1) Arrays.fill Arrays stair -1 1 stair[n-1] = 1 stair[n-1] stair n-1 n 1 1 stair[n-2] = 1 stair[n-2] stair n-2 n 2 1 for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      } {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      } brokenStair = Integer.parseInt(sc.next()) brokenStair Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc stair[brokenStair-1] = 0 stair[brokenStair-1] stair brokenStair-1 brokenStair 1 0 for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      } int i = n-3; int i = n-3; i n-3 n 3 i >= 0 i 0 i-- i-- i {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      } {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      } if(stair[i] == 0) continue; stair[i] == 0 stair[i] stair i 0 continue; stair[i] = (stair[i+1] + stair[i+2]) % 1000000007 stair[i] stair i (stair[i+1] + stair[i+2]) % 1000000007 (stair[i+1] + stair[i+2]) stair[i+1] stair i+1 i 1 stair[i+2] stair i+2 i 2 1000000007 int answer = (stair[0] + stair[1]) % 1000000007; answer (stair[0] + stair[1]) % 1000000007 (stair[0] + stair[1]) stair[0] stair 0 stair[1] stair 1 1000000007 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = Integer.parseInt(sc.next());
    int brokenStair;
    int[] stair = new int[n];
    if(n == 1) {
      System.out.println(1);
    } else {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = Integer.parseInt(sc.next());
    int brokenStair;
    int[] stair = new int[n];
    if(n == 1) {
      System.out.println(1);
    } else {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    }
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = Integer.parseInt(sc.next());
    int brokenStair;
    int[] stair = new int[n];
    if(n == 1) {
      System.out.println(1);
    } else {
      Arrays.fill(stair, -1);
      stair[n-1] = 1;
      stair[n-2] = 1;
      for(int i = 0; i < m; i++) {
        brokenStair = Integer.parseInt(sc.next());
        stair[brokenStair-1] = 0;
      }
      for(int i = n-3; i >= 0; i--) {
        if(stair[i] == 0) continue;
        stair[i] = (stair[i+1] + stair[i+2]) % 1000000007;
      }
      int answer = (stair[0] + stair[1]) % 1000000007;
      System.out.println(answer);
    }
  }
}
