import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private Scanner sc = new Scanner(System.in);

  int N;
  int M;
  long[] memo;
  boolean[] broken;

  private long dfs(int pos) {
    if (pos > N) {
      return 0L;
    }
    if (broken[pos]) {
      return 0L;
    }
    if (pos == N) {
      return 1L;
    }
    if (memo[pos] != -1) {
      return memo[pos];
    }

    long res = dfs(pos + 1) + dfs(pos + 2);

    return memo[pos] = res % 1000000007L;
  }

  private void run() {
    N = Integer.parseInt(sc.next());
    M = Integer.parseInt(sc.next());
    broken = new boolean[N + 5];
    for (int i = 0; i < M; i++) {
      int tmp = Integer.parseInt(sc.next());
      broken[tmp] = true;
    }

    memo = new long[N + 5];
    for (int i = 0; i < N + 5; i++) {
      memo[i] = -1;
    }

    long ans = dfs(0);
    System.out.println(ans);

  }
} import java.util.Scanner; Scanner java.util class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private Scanner sc = new Scanner(System.in);

  int N;
  int M;
  long[] memo;
  boolean[] broken;

  private long dfs(int pos) {
    if (pos > N) {
      return 0L;
    }
    if (broken[pos]) {
      return 0L;
    }
    if (pos == N) {
      return 1L;
    }
    if (memo[pos] != -1) {
      return memo[pos];
    }

    long res = dfs(pos + 1) + dfs(pos + 2);

    return memo[pos] = res % 1000000007L;
  }

  private void run() {
    N = Integer.parseInt(sc.next());
    M = Integer.parseInt(sc.next());
    broken = new boolean[N + 5];
    for (int i = 0; i < M; i++) {
      int tmp = Integer.parseInt(sc.next());
      broken[tmp] = true;
    }

    memo = new long[N + 5];
    for (int i = 0; i < N + 5; i++) {
      memo[i] = -1;
    }

    long ans = dfs(0);
    System.out.println(ans);

  }
} Main private Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N; N int M; M long[] memo; memo boolean[] broken; broken public static void main(String[] args) {
    new Main().run();
  } main {
    new Main().run();
  } new Main().run() new Main().run new Main() String[] args args private long dfs(int pos) {
    if (pos > N) {
      return 0L;
    }
    if (broken[pos]) {
      return 0L;
    }
    if (pos == N) {
      return 1L;
    }
    if (memo[pos] != -1) {
      return memo[pos];
    }

    long res = dfs(pos + 1) + dfs(pos + 2);

    return memo[pos] = res % 1000000007L;
  } dfs {
    if (pos > N) {
      return 0L;
    }
    if (broken[pos]) {
      return 0L;
    }
    if (pos == N) {
      return 1L;
    }
    if (memo[pos] != -1) {
      return memo[pos];
    }

    long res = dfs(pos + 1) + dfs(pos + 2);

    return memo[pos] = res % 1000000007L;
  } if (pos > N) {
      return 0L;
    } pos > N pos N {
      return 0L;
    } return 0L; 0L if (broken[pos]) {
      return 0L;
    } broken[pos] broken pos {
      return 0L;
    } return 0L; 0L if (pos == N) {
      return 1L;
    } pos == N pos N {
      return 1L;
    } return 1L; 1L if (memo[pos] != -1) {
      return memo[pos];
    } memo[pos] != -1 memo[pos] memo pos -1 1 {
      return memo[pos];
    } return memo[pos]; memo[pos] memo pos long res = dfs(pos + 1) + dfs(pos + 2); res dfs(pos + 1) + dfs(pos + 2) dfs(pos + 1) dfs pos + 1 pos 1 dfs(pos + 2) dfs pos + 2 pos 2 return memo[pos] = res % 1000000007L; memo[pos] = res % 1000000007L memo[pos] memo pos res % 1000000007L res 1000000007L int pos pos private void run() {
    N = Integer.parseInt(sc.next());
    M = Integer.parseInt(sc.next());
    broken = new boolean[N + 5];
    for (int i = 0; i < M; i++) {
      int tmp = Integer.parseInt(sc.next());
      broken[tmp] = true;
    }

    memo = new long[N + 5];
    for (int i = 0; i < N + 5; i++) {
      memo[i] = -1;
    }

    long ans = dfs(0);
    System.out.println(ans);

  } run {
    N = Integer.parseInt(sc.next());
    M = Integer.parseInt(sc.next());
    broken = new boolean[N + 5];
    for (int i = 0; i < M; i++) {
      int tmp = Integer.parseInt(sc.next());
      broken[tmp] = true;
    }

    memo = new long[N + 5];
    for (int i = 0; i < N + 5; i++) {
      memo[i] = -1;
    }

    long ans = dfs(0);
    System.out.println(ans);

  } N = Integer.parseInt(sc.next()) N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc M = Integer.parseInt(sc.next()) M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc broken = new boolean[N + 5] broken new boolean[N + 5] N + 5 N 5 for (int i = 0; i < M; i++) {
      int tmp = Integer.parseInt(sc.next());
      broken[tmp] = true;
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      int tmp = Integer.parseInt(sc.next());
      broken[tmp] = true;
    } {
      int tmp = Integer.parseInt(sc.next());
      broken[tmp] = true;
    } int tmp = Integer.parseInt(sc.next()); tmp Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc broken[tmp] = true broken[tmp] broken tmp true memo = new long[N + 5] memo new long[N + 5] N + 5 N 5 for (int i = 0; i < N + 5; i++) {
      memo[i] = -1;
    } int i = 0; int i = 0; i 0 i < N + 5 i N + 5 N 5 i++ i++ i {
      memo[i] = -1;
    } {
      memo[i] = -1;
    } memo[i] = -1 memo[i] memo i -1 1 long ans = dfs(0); ans dfs(0) dfs 0 System.out.println(ans) System.out.println System.out System System.out ans
import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private Scanner sc = new Scanner(System.in);

  int N;
  int M;
  long[] memo;
  boolean[] broken;

  private long dfs(int pos) {
    if (pos > N) {
      return 0L;
    }
    if (broken[pos]) {
      return 0L;
    }
    if (pos == N) {
      return 1L;
    }
    if (memo[pos] != -1) {
      return memo[pos];
    }

    long res = dfs(pos + 1) + dfs(pos + 2);

    return memo[pos] = res % 1000000007L;
  }

  private void run() {
    N = Integer.parseInt(sc.next());
    M = Integer.parseInt(sc.next());
    broken = new boolean[N + 5];
    for (int i = 0; i < M; i++) {
      int tmp = Integer.parseInt(sc.next());
      broken[tmp] = true;
    }

    memo = new long[N + 5];
    for (int i = 0; i < N + 5; i++) {
      memo[i] = -1;
    }

    long ans = dfs(0);
    System.out.println(ans);

  }
}
