import java.util.*;
public class Main {
    static final long mod = (long) (1e9 + 7);
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] oks = new boolean[n + 1];
        Arrays.fill(oks, true);
        for (int i = 0; i < m; i++) {
            int a = sc.nextInt();
            oks[a] = false;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        for (int now = 0; now < n; now++) {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
} import java.util.*; util.* java public class Main {
    static final long mod = (long) (1e9 + 7);
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] oks = new boolean[n + 1];
        Arrays.fill(oks, true);
        for (int i = 0; i < m; i++) {
            int a = sc.nextInt();
            oks[a] = false;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        for (int now = 0; now < n; now++) {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
} Main static final long mod = (long) (1e9 + 7); mod (long) (1e9 + 7) 1e9 7 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] oks = new boolean[n + 1];
        Arrays.fill(oks, true);
        for (int i = 0; i < m; i++) {
            int a = sc.nextInt();
            oks[a] = false;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        for (int now = 0; now < n; now++) {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        }
        System.out.println(dp[n]);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] oks = new boolean[n + 1];
        Arrays.fill(oks, true);
        for (int i = 0; i < m; i++) {
            int a = sc.nextInt();
            oks[a] = false;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        for (int now = 0; now < n; now++) {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        }
        System.out.println(dp[n]);
        sc.close();
    } 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 boolean[] oks = new boolean[n + 1]; oks new boolean[n + 1] n + 1 n 1 Arrays.fill(oks, true) Arrays.fill Arrays oks true for (int i = 0; i < m; i++) {
            int a = sc.nextInt();
            oks[a] = false;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            int a = sc.nextInt();
            oks[a] = false;
        } {
            int a = sc.nextInt();
            oks[a] = false;
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc oks[a] = false oks[a] oks a false long[] dp = new long[n + 1]; dp new long[n + 1] n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 for (int now = 0; now < n; now++) {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        } int now = 0; int now = 0; now 0 now < n now n now++ now++ now {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        } {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        } for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            } int next = now + 1; int next = now + 1; next now + 1 now 1 next <= Math.min(n, now + 2) next Math.min(n, now + 2) Math.min Math n now + 2 now 2 next++ next++ next {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            } {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            } if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                } oks[next] oks next {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                } dp[next] += dp[now] dp[next] dp next dp[now] dp now dp[next] %= mod dp[next] dp next mod System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n sc.close() sc.close sc String[] args args public class Main {
    static final long mod = (long) (1e9 + 7);
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] oks = new boolean[n + 1];
        Arrays.fill(oks, true);
        for (int i = 0; i < m; i++) {
            int a = sc.nextInt();
            oks[a] = false;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        for (int now = 0; now < n; now++) {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
} public class Main {
    static final long mod = (long) (1e9 + 7);
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] oks = new boolean[n + 1];
        Arrays.fill(oks, true);
        for (int i = 0; i < m; i++) {
            int a = sc.nextInt();
            oks[a] = false;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        for (int now = 0; now < n; now++) {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
} Main
import java.util.*;
public class Main {
    static final long mod = (long) (1e9 + 7);
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] oks = new boolean[n + 1];
        Arrays.fill(oks, true);
        for (int i = 0; i < m; i++) {
            int a = sc.nextInt();
            oks[a] = false;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        for (int now = 0; now < n; now++) {
            for (int next = now + 1; next <= Math.min(n, now + 2); next++) {
                if (oks[next]) {
                    dp[next] += dp[now];
                    dp[next] %= mod;
                }
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
}