import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();

    final int mod = 1000000007;

    int[] steps = new int[n + 1];

    for (int i = 0; i < m; ++i)
      steps[sc.nextInt()] = -1;

    steps[n] = 1;
    steps[n - 1] = (steps[n - 1] == -1) ? -1 : 1;

    for (int i = n - 2; i >= 0; --i) {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    }

    System.out.println(steps[0] % mod);
  }
} import java.util.Scanner; Scanner 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();

    final int mod = 1000000007;

    int[] steps = new int[n + 1];

    for (int i = 0; i < m; ++i)
      steps[sc.nextInt()] = -1;

    steps[n] = 1;
    steps[n - 1] = (steps[n - 1] == -1) ? -1 : 1;

    for (int i = n - 2; i >= 0; --i) {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    }

    System.out.println(steps[0] % mod);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();

    final int mod = 1000000007;

    int[] steps = new int[n + 1];

    for (int i = 0; i < m; ++i)
      steps[sc.nextInt()] = -1;

    steps[n] = 1;
    steps[n - 1] = (steps[n - 1] == -1) ? -1 : 1;

    for (int i = n - 2; i >= 0; --i) {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    }

    System.out.println(steps[0] % mod);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();

    final int mod = 1000000007;

    int[] steps = new int[n + 1];

    for (int i = 0; i < m; ++i)
      steps[sc.nextInt()] = -1;

    steps[n] = 1;
    steps[n - 1] = (steps[n - 1] == -1) ? -1 : 1;

    for (int i = n - 2; i >= 0; --i) {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    }

    System.out.println(steps[0] % mod);
  } 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 final int mod = 1000000007; mod 1000000007 int[] steps = new int[n + 1]; steps new int[n + 1] n + 1 n 1 for (int i = 0; i < m; ++i)
      steps[sc.nextInt()] = -1; int i = 0; int i = 0; i 0 i < m i m ++i ++i i steps[sc.nextInt()] = -1; steps[sc.nextInt()] = -1 steps[sc.nextInt()] steps sc.nextInt() sc.nextInt sc -1 1 steps[n] = 1 steps[n] steps n 1 steps[n - 1] = (steps[n - 1] == -1) ? -1 : 1 steps[n - 1] steps n - 1 n 1 (steps[n - 1] == -1) ? -1 : 1 (steps[n - 1] == -1) steps[n - 1] steps n - 1 n 1 -1 1 -1 1 1 for (int i = n - 2; i >= 0; --i) {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    } int i = n - 2; int i = n - 2; i n - 2 n 2 i >= 0 i 0 --i --i i {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    } {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    } if (steps[i] == -1)
        continue; steps[i] == -1 steps[i] steps i -1 1 continue; steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod steps[i] steps i (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod (steps[i + 1] == -1) steps[i + 1] steps i + 1 i 1 -1 1 steps[i] steps i steps[i] % mod + steps[i + 1] % mod steps[i] % mod steps[i] steps i mod steps[i + 1] % mod steps[i + 1] steps i + 1 i 1 mod steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod steps[i] steps i (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod (steps[i + 2] == -1) steps[i + 2] steps i + 2 i 2 -1 1 steps[i] steps i steps[i] % mod + steps[i + 2] % mod steps[i] % mod steps[i] steps i mod steps[i + 2] % mod steps[i + 2] steps i + 2 i 2 mod System.out.println(steps[0] % mod) System.out.println System.out System System.out steps[0] % mod steps[0] steps 0 mod 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();

    final int mod = 1000000007;

    int[] steps = new int[n + 1];

    for (int i = 0; i < m; ++i)
      steps[sc.nextInt()] = -1;

    steps[n] = 1;
    steps[n - 1] = (steps[n - 1] == -1) ? -1 : 1;

    for (int i = n - 2; i >= 0; --i) {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    }

    System.out.println(steps[0] % mod);
  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();

    final int mod = 1000000007;

    int[] steps = new int[n + 1];

    for (int i = 0; i < m; ++i)
      steps[sc.nextInt()] = -1;

    steps[n] = 1;
    steps[n - 1] = (steps[n - 1] == -1) ? -1 : 1;

    for (int i = n - 2; i >= 0; --i) {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    }

    System.out.println(steps[0] % mod);
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();

    final int mod = 1000000007;

    int[] steps = new int[n + 1];

    for (int i = 0; i < m; ++i)
      steps[sc.nextInt()] = -1;

    steps[n] = 1;
    steps[n - 1] = (steps[n - 1] == -1) ? -1 : 1;

    for (int i = n - 2; i >= 0; --i) {
      if (steps[i] == -1)
        continue;
      steps[i] = (steps[i + 1] == -1) ? steps[i] : steps[i] % mod + steps[i + 1] % mod;
      steps[i] = (steps[i + 2] == -1) ? steps[i] : steps[i] % mod + steps[i + 2] % mod;
    }

    System.out.println(steps[0] % mod);
  }
}