import java.util.*;
 
class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int mod = 1000000007;
        int[] broken = new int[n + 1];
        for (int i = 0; i < m; i++) {
            broken[scan.nextInt()] = 1;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        if (broken[1] == 0) {
            dp[1] = 1;
        } else {
            dp[1] = 0;
        }
        for (int i = 2; i < n + 1; i++) {
            if (broken[i] == 1) {
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2])%mod;
        }
        System.out.println(dp[dp.length - 1]);
    }
} import java.util.*; util.* java class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int mod = 1000000007;
        int[] broken = new int[n + 1];
        for (int i = 0; i < m; i++) {
            broken[scan.nextInt()] = 1;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        if (broken[1] == 0) {
            dp[1] = 1;
        } else {
            dp[1] = 0;
        }
        for (int i = 2; i < n + 1; i++) {
            if (broken[i] == 1) {
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2])%mod;
        }
        System.out.println(dp[dp.length - 1]);
    }
} Main public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int mod = 1000000007;
        int[] broken = new int[n + 1];
        for (int i = 0; i < m; i++) {
            broken[scan.nextInt()] = 1;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        if (broken[1] == 0) {
            dp[1] = 1;
        } else {
            dp[1] = 0;
        }
        for (int i = 2; i < n + 1; i++) {
            if (broken[i] == 1) {
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2])%mod;
        }
        System.out.println(dp[dp.length - 1]);
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int mod = 1000000007;
        int[] broken = new int[n + 1];
        for (int i = 0; i < m; i++) {
            broken[scan.nextInt()] = 1;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        if (broken[1] == 0) {
            dp[1] = 1;
        } else {
            dp[1] = 0;
        }
        for (int i = 2; i < n + 1; i++) {
            if (broken[i] == 1) {
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2])%mod;
        }
        System.out.println(dp[dp.length - 1]);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int mod = 1000000007; mod 1000000007 int[] broken = new int[n + 1]; broken new int[n + 1] n + 1 n 1 for (int i = 0; i < m; i++) {
            broken[scan.nextInt()] = 1;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            broken[scan.nextInt()] = 1;
        } {
            broken[scan.nextInt()] = 1;
        } broken[scan.nextInt()] = 1 broken[scan.nextInt()] broken scan.nextInt() scan.nextInt scan 1 long[] dp = new long[n + 1]; dp new long[n + 1] n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 if (broken[1] == 0) {
            dp[1] = 1;
        } else {
            dp[1] = 0;
        } broken[1] == 0 broken[1] broken 1 0 {
            dp[1] = 1;
        } dp[1] = 1 dp[1] dp 1 1 {
            dp[1] = 0;
        } dp[1] = 0 dp[1] dp 1 0 for (int i = 2; i < n + 1; i++) {
            if (broken[i] == 1) {
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2])%mod;
        } int i = 2; int i = 2; i 2 i < n + 1 i n + 1 n 1 i++ i++ i {
            if (broken[i] == 1) {
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2])%mod;
        } {
            if (broken[i] == 1) {
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2])%mod;
        } if (broken[i] == 1) {
                continue;
            } broken[i] == 1 broken[i] broken i 1 {
                continue;
            } continue; dp[i] = (dp[i - 1] + dp[i - 2])%mod dp[i] dp i (dp[i - 1] + dp[i - 2])%mod (dp[i - 1] + dp[i - 2]) dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 mod System.out.println(dp[dp.length - 1]) System.out.println System.out System System.out dp[dp.length - 1] dp dp.length - 1 dp.length dp dp.length 1 final String[] args args
import java.util.*;
 
class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int mod = 1000000007;
        int[] broken = new int[n + 1];
        for (int i = 0; i < m; i++) {
            broken[scan.nextInt()] = 1;
        }
        long[] dp = new long[n + 1];
        dp[0] = 1;
        if (broken[1] == 0) {
            dp[1] = 1;
        } else {
            dp[1] = 0;
        }
        for (int i = 2; i < n + 1; i++) {
            if (broken[i] == 1) {
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2])%mod;
        }
        System.out.println(dp[dp.length - 1]);
    }
}