import java.util.Scanner;

public class Main {
  private static final int mod = 1_000_000_007;
  private static void solve(int n, int m, int[] a) {
    int brokenIndex = 0;
    int[] steps = new int[n + 1];
    steps[0] = 1;
    if (brokenIndex < m && a[brokenIndex] == 1) {
      brokenIndex++;
    } else {
      steps[1] = 1;
    }
    for (int i = 2; i <= n; i++) {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    }
    System.out.println(steps[n]);
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] nums = sc.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[] a = new int[m];
    for (int i = 0; i < m; i++) a[i] = Integer.parseInt(sc.nextLine());
    sc.close();
    solve(n, m, a);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  private static final int mod = 1_000_000_007;
  private static void solve(int n, int m, int[] a) {
    int brokenIndex = 0;
    int[] steps = new int[n + 1];
    steps[0] = 1;
    if (brokenIndex < m && a[brokenIndex] == 1) {
      brokenIndex++;
    } else {
      steps[1] = 1;
    }
    for (int i = 2; i <= n; i++) {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    }
    System.out.println(steps[n]);
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] nums = sc.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[] a = new int[m];
    for (int i = 0; i < m; i++) a[i] = Integer.parseInt(sc.nextLine());
    sc.close();
    solve(n, m, a);
  }
} Main private static final int mod = 1_000_000_007; mod 1_000_000_007 private static void solve(int n, int m, int[] a) {
    int brokenIndex = 0;
    int[] steps = new int[n + 1];
    steps[0] = 1;
    if (brokenIndex < m && a[brokenIndex] == 1) {
      brokenIndex++;
    } else {
      steps[1] = 1;
    }
    for (int i = 2; i <= n; i++) {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    }
    System.out.println(steps[n]);
  } solve {
    int brokenIndex = 0;
    int[] steps = new int[n + 1];
    steps[0] = 1;
    if (brokenIndex < m && a[brokenIndex] == 1) {
      brokenIndex++;
    } else {
      steps[1] = 1;
    }
    for (int i = 2; i <= n; i++) {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    }
    System.out.println(steps[n]);
  } int brokenIndex = 0; brokenIndex 0 int[] steps = new int[n + 1]; steps new int[n + 1] n + 1 n 1 steps[0] = 1 steps[0] steps 0 1 if (brokenIndex < m && a[brokenIndex] == 1) {
      brokenIndex++;
    } else {
      steps[1] = 1;
    } brokenIndex < m && a[brokenIndex] == 1 brokenIndex < m brokenIndex m a[brokenIndex] == 1 a[brokenIndex] a brokenIndex 1 {
      brokenIndex++;
    } brokenIndex++ brokenIndex {
      steps[1] = 1;
    } steps[1] = 1 steps[1] steps 1 1 for (int i = 2; i <= n; i++) {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    } int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    } {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    } if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      } brokenIndex < m && a[brokenIndex] == i brokenIndex < m brokenIndex m a[brokenIndex] == i a[brokenIndex] a brokenIndex i {
        steps[i] = 0;
        brokenIndex++;
      } steps[i] = 0 steps[i] steps i 0 brokenIndex++ brokenIndex {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      } steps[i] = steps[i - 1] + steps[i - 2] steps[i] steps i steps[i - 1] + steps[i - 2] steps[i - 1] steps i - 1 i 1 steps[i - 2] steps i - 2 i 2 if (steps[i] >= mod) steps[i] -= mod; steps[i] >= mod steps[i] steps i mod steps[i] -= mod steps[i] steps i mod System.out.println(steps[n]) System.out.println System.out System System.out steps[n] steps n int n n int m m int[] a a public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] nums = sc.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[] a = new int[m];
    for (int i = 0; i < m; i++) a[i] = Integer.parseInt(sc.nextLine());
    sc.close();
    solve(n, m, a);
  } main {
    Scanner sc = new Scanner(System.in);
    String[] nums = sc.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[] a = new int[m];
    for (int i = 0; i < m; i++) a[i] = Integer.parseInt(sc.nextLine());
    sc.close();
    solve(n, m, a);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] nums = sc.nextLine().split(" "); nums sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int n = Integer.parseInt(nums[0]); n Integer.parseInt(nums[0]) Integer.parseInt Integer nums[0] nums 0 int m = Integer.parseInt(nums[1]); m Integer.parseInt(nums[1]) Integer.parseInt Integer nums[1] nums 1 int[] a = new int[m]; a new int[m] m for (int i = 0; i < m; i++) a[i] = Integer.parseInt(sc.nextLine()); int i = 0; int i = 0; i 0 i < m i m i++ i++ i a[i] = Integer.parseInt(sc.nextLine()); a[i] = Integer.parseInt(sc.nextLine()) a[i] a i Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc sc.close() sc.close sc solve(n, m, a) solve n m a String[] args args public class Main {
  private static final int mod = 1_000_000_007;
  private static void solve(int n, int m, int[] a) {
    int brokenIndex = 0;
    int[] steps = new int[n + 1];
    steps[0] = 1;
    if (brokenIndex < m && a[brokenIndex] == 1) {
      brokenIndex++;
    } else {
      steps[1] = 1;
    }
    for (int i = 2; i <= n; i++) {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    }
    System.out.println(steps[n]);
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] nums = sc.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[] a = new int[m];
    for (int i = 0; i < m; i++) a[i] = Integer.parseInt(sc.nextLine());
    sc.close();
    solve(n, m, a);
  }
} public class Main {
  private static final int mod = 1_000_000_007;
  private static void solve(int n, int m, int[] a) {
    int brokenIndex = 0;
    int[] steps = new int[n + 1];
    steps[0] = 1;
    if (brokenIndex < m && a[brokenIndex] == 1) {
      brokenIndex++;
    } else {
      steps[1] = 1;
    }
    for (int i = 2; i <= n; i++) {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    }
    System.out.println(steps[n]);
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] nums = sc.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[] a = new int[m];
    for (int i = 0; i < m; i++) a[i] = Integer.parseInt(sc.nextLine());
    sc.close();
    solve(n, m, a);
  }
} Main
import java.util.Scanner;

public class Main {
  private static final int mod = 1_000_000_007;
  private static void solve(int n, int m, int[] a) {
    int brokenIndex = 0;
    int[] steps = new int[n + 1];
    steps[0] = 1;
    if (brokenIndex < m && a[brokenIndex] == 1) {
      brokenIndex++;
    } else {
      steps[1] = 1;
    }
    for (int i = 2; i <= n; i++) {
      if (brokenIndex < m && a[brokenIndex] == i) {
        steps[i] = 0;
        brokenIndex++;
      } else {
        steps[i] = steps[i - 1] + steps[i - 2];
        if (steps[i] >= mod) steps[i] -= mod;
      }
    }
    System.out.println(steps[n]);
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] nums = sc.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[] a = new int[m];
    for (int i = 0; i < m; i++) a[i] = Integer.parseInt(sc.nextLine());
    sc.close();
    solve(n, m, a);
  }
}