import java.util.Arrays;
import java.util.Scanner;

public class Main {
    private static int MOD = 1000000007;
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());

        boolean[] isSafe = new boolean[N];
        Arrays.fill(isSafe, true);
        for(int i = 0; i < M; i++) {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        }

        Long[] dp = new Long[N+1];
        Arrays.fill(dp, 0L);
        dp[0] = 1L;
        if(M == 0 || isSafe[1]) dp[1] = 1L;

        for(int i = 2; i <= N; i++) {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        }
        System.out.println(dp[N]);
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    private static int MOD = 1000000007;
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());

        boolean[] isSafe = new boolean[N];
        Arrays.fill(isSafe, true);
        for(int i = 0; i < M; i++) {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        }

        Long[] dp = new Long[N+1];
        Arrays.fill(dp, 0L);
        dp[0] = 1L;
        if(M == 0 || isSafe[1]) dp[1] = 1L;

        for(int i = 2; i <= N; i++) {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        }
        System.out.println(dp[N]);
    }
} Main private static int MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());

        boolean[] isSafe = new boolean[N];
        Arrays.fill(isSafe, true);
        for(int i = 0; i < M; i++) {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        }

        Long[] dp = new Long[N+1];
        Arrays.fill(dp, 0L);
        dp[0] = 1L;
        if(M == 0 || isSafe[1]) dp[1] = 1L;

        for(int i = 2; i <= N; i++) {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        }
        System.out.println(dp[N]);
    } main {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());

        boolean[] isSafe = new boolean[N];
        Arrays.fill(isSafe, true);
        for(int i = 0; i < M; i++) {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        }

        Long[] dp = new Long[N+1];
        Arrays.fill(dp, 0L);
        dp[0] = 1L;
        if(M == 0 || isSafe[1]) dp[1] = 1L;

        for(int i = 2; i <= N; i++) {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        }
        System.out.println(dp[N]);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) Integer N = Integer.parseInt(scanner.next()); N Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Integer M = Integer.parseInt(scanner.next()); M Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner boolean[] isSafe = new boolean[N]; isSafe new boolean[N] N Arrays.fill(isSafe, true) Arrays.fill Arrays isSafe true for(int i = 0; i < M; i++) {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        } {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        } int a = Integer.parseInt(scanner.next()); a Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner isSafe[a] = false isSafe[a] isSafe a false Long[] dp = new Long[N+1]; dp new Long[N+1] N+1 N 1 Arrays.fill(dp, 0L) Arrays.fill Arrays dp 0L dp[0] = 1L dp[0] dp 0 1L if(M == 0 || isSafe[1]) dp[1] = 1L; M == 0 || isSafe[1] M == 0 M 0 isSafe[1] isSafe 1 dp[1] = 1L dp[1] dp 1 1L for(int i = 2; i <= N; i++) {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        } int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        } {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        } if (isSafe[i-1]) dp[i] += dp[i-1]; isSafe[i-1] isSafe i-1 i 1 dp[i] += dp[i-1] dp[i] dp i dp[i-1] dp i-1 i 1 if (isSafe[i-2]) dp[i] += dp[i-2]; isSafe[i-2] isSafe i-2 i 2 dp[i] += dp[i-2] dp[i] dp i dp[i-2] dp i-2 i 2 dp[i] %= MOD dp[i] dp i 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 int MOD = 1000000007;
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());

        boolean[] isSafe = new boolean[N];
        Arrays.fill(isSafe, true);
        for(int i = 0; i < M; i++) {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        }

        Long[] dp = new Long[N+1];
        Arrays.fill(dp, 0L);
        dp[0] = 1L;
        if(M == 0 || isSafe[1]) dp[1] = 1L;

        for(int i = 2; i <= N; i++) {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        }
        System.out.println(dp[N]);
    }
} public class Main {
    private static int MOD = 1000000007;
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());

        boolean[] isSafe = new boolean[N];
        Arrays.fill(isSafe, true);
        for(int i = 0; i < M; i++) {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        }

        Long[] dp = new Long[N+1];
        Arrays.fill(dp, 0L);
        dp[0] = 1L;
        if(M == 0 || isSafe[1]) dp[1] = 1L;

        for(int i = 2; i <= N; i++) {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        }
        System.out.println(dp[N]);
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    private static int MOD = 1000000007;
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());

        boolean[] isSafe = new boolean[N];
        Arrays.fill(isSafe, true);
        for(int i = 0; i < M; i++) {
            int a = Integer.parseInt(scanner.next());
            isSafe[a] = false;
        }

        Long[] dp = new Long[N+1];
        Arrays.fill(dp, 0L);
        dp[0] = 1L;
        if(M == 0 || isSafe[1]) dp[1] = 1L;

        for(int i = 2; i <= N; i++) {
            if (isSafe[i-1]) dp[i] += dp[i-1];
            if (isSafe[i-2]) dp[i] += dp[i-2];
            dp[i] %= MOD; // 1000000007 で割る
        }
        System.out.println(dp[N]);
    }
}