import java.util.*;

public class Main {
    private static long[] dp = new long[100100];
    private static final long INF = 1L << 60;
    private static final long MOD = 1000000007L;
    public static void main(String[] args) throws Exception {
        Arrays.fill(dp,0);
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int W = Integer.parseInt(sc.next());
        boolean brokenSteps[] = new boolean[100100];
        Arrays.fill(brokenSteps,false);
        for(int i=0;i<W;i++){
            brokenSteps[Integer.parseInt(sc.next())] = true;
        }
        dp[0] = 1;
        long res = 1;
        for(int i=0;i<=N;i++){
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        }
        System.out.println(dp[N]);
    }
} import java.util.*; util.* java public class Main {
    private static long[] dp = new long[100100];
    private static final long INF = 1L << 60;
    private static final long MOD = 1000000007L;
    public static void main(String[] args) throws Exception {
        Arrays.fill(dp,0);
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int W = Integer.parseInt(sc.next());
        boolean brokenSteps[] = new boolean[100100];
        Arrays.fill(brokenSteps,false);
        for(int i=0;i<W;i++){
            brokenSteps[Integer.parseInt(sc.next())] = true;
        }
        dp[0] = 1;
        long res = 1;
        for(int i=0;i<=N;i++){
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        }
        System.out.println(dp[N]);
    }
} Main private static long[] dp = new long[100100]; dp new long[100100] 100100 private static final long INF = 1L << 60; INF 1L << 60 1L 60 private static final long MOD = 1000000007L; MOD 1000000007L public static void main(String[] args) throws Exception {
        Arrays.fill(dp,0);
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int W = Integer.parseInt(sc.next());
        boolean brokenSteps[] = new boolean[100100];
        Arrays.fill(brokenSteps,false);
        for(int i=0;i<W;i++){
            brokenSteps[Integer.parseInt(sc.next())] = true;
        }
        dp[0] = 1;
        long res = 1;
        for(int i=0;i<=N;i++){
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        }
        System.out.println(dp[N]);
    } main {
        Arrays.fill(dp,0);
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int W = Integer.parseInt(sc.next());
        boolean brokenSteps[] = new boolean[100100];
        Arrays.fill(brokenSteps,false);
        for(int i=0;i<W;i++){
            brokenSteps[Integer.parseInt(sc.next())] = true;
        }
        dp[0] = 1;
        long res = 1;
        for(int i=0;i<=N;i++){
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        }
        System.out.println(dp[N]);
    } Arrays.fill(dp,0) Arrays.fill Arrays dp 0 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 W = Integer.parseInt(sc.next()); W Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc boolean brokenSteps[] = new boolean[100100]; brokenSteps new boolean[100100] 100100 Arrays.fill(brokenSteps,false) Arrays.fill Arrays brokenSteps false for(int i=0;i<W;i++){
            brokenSteps[Integer.parseInt(sc.next())] = true;
        } int i=0; int i=0; i 0 i<W i W i++ i++ i {
            brokenSteps[Integer.parseInt(sc.next())] = true;
        } {
            brokenSteps[Integer.parseInt(sc.next())] = true;
        } brokenSteps[Integer.parseInt(sc.next())] = true brokenSteps[Integer.parseInt(sc.next())] brokenSteps Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc true dp[0] = 1 dp[0] dp 0 1 long res = 1; res 1 for(int i=0;i<=N;i++){
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        } int i=0; int i=0; i 0 i<=N i N i++ i++ i {
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        } {
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        } for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            } int j=i+1; int j=i+1; j i+1 i 1 j<=Math.min(N,i+2) j Math.min(N,i+2) Math.min Math N i+2 i 2 j++ j++ j {
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            } {
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            } if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                } !brokenSteps[j] brokenSteps[j] brokenSteps j {
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                } dp[j] += dp[i] dp[j] dp j dp[i] dp i dp[j] %= MOD dp[j] dp j MOD System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N String[] args args public class Main {
    private static long[] dp = new long[100100];
    private static final long INF = 1L << 60;
    private static final long MOD = 1000000007L;
    public static void main(String[] args) throws Exception {
        Arrays.fill(dp,0);
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int W = Integer.parseInt(sc.next());
        boolean brokenSteps[] = new boolean[100100];
        Arrays.fill(brokenSteps,false);
        for(int i=0;i<W;i++){
            brokenSteps[Integer.parseInt(sc.next())] = true;
        }
        dp[0] = 1;
        long res = 1;
        for(int i=0;i<=N;i++){
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        }
        System.out.println(dp[N]);
    }
} public class Main {
    private static long[] dp = new long[100100];
    private static final long INF = 1L << 60;
    private static final long MOD = 1000000007L;
    public static void main(String[] args) throws Exception {
        Arrays.fill(dp,0);
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int W = Integer.parseInt(sc.next());
        boolean brokenSteps[] = new boolean[100100];
        Arrays.fill(brokenSteps,false);
        for(int i=0;i<W;i++){
            brokenSteps[Integer.parseInt(sc.next())] = true;
        }
        dp[0] = 1;
        long res = 1;
        for(int i=0;i<=N;i++){
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        }
        System.out.println(dp[N]);
    }
} Main
import java.util.*;

public class Main {
    private static long[] dp = new long[100100];
    private static final long INF = 1L << 60;
    private static final long MOD = 1000000007L;
    public static void main(String[] args) throws Exception {
        Arrays.fill(dp,0);
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int W = Integer.parseInt(sc.next());
        boolean brokenSteps[] = new boolean[100100];
        Arrays.fill(brokenSteps,false);
        for(int i=0;i<W;i++){
            brokenSteps[Integer.parseInt(sc.next())] = true;
        }
        dp[0] = 1;
        long res = 1;
        for(int i=0;i<=N;i++){
            for(int j=i+1;j<=Math.min(N,i+2);j++){
                if(!brokenSteps[j]){
                    dp[j] += dp[i];
                    dp[j] %= MOD;
                }
            }
        }
        System.out.println(dp[N]);
    }
}