import java.util.*;

public class Main {
    //Typical Stairs
    //DP?
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();
        int[] dp = new int[n + 1];
        dp[0] = 1;
        int mod = 1000000007;
        for (int i = 1; i <= m; i++) dp[sc.nextInt()] = -1;
        for (int i = 1; i <= n; i++) {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
} import java.util.*; util.* java public class Main {
    //Typical Stairs
    //DP?
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();
        int[] dp = new int[n + 1];
        dp[0] = 1;
        int mod = 1000000007;
        for (int i = 1; i <= m; i++) dp[sc.nextInt()] = -1;
        for (int i = 1; i <= n; i++) {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
} Main //Typical Stairs
    //DP?
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();
        int[] dp = new int[n + 1];
        dp[0] = 1;
        int mod = 1000000007;
        for (int i = 1; i <= m; i++) dp[sc.nextInt()] = -1;
        for (int i = 1; i <= n; i++) {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        }
        System.out.println(dp[n]);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();
        int[] dp = new int[n + 1];
        dp[0] = 1;
        int mod = 1000000007;
        for (int i = 1; i <= m; i++) dp[sc.nextInt()] = -1;
        for (int i = 1; i <= n; i++) {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % 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 m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] dp = new int[n + 1]; dp new int[n + 1] n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 int mod = 1000000007; mod 1000000007 for (int i = 1; i <= m; i++) dp[sc.nextInt()] = -1; int i = 1; int i = 1; i 1 i <= m i m i++ i++ i dp[sc.nextInt()] = -1; dp[sc.nextInt()] = -1 dp[sc.nextInt()] dp sc.nextInt() sc.nextInt sc -1 1 for (int i = 1; i <= n; i++) {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        } {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        } if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            } dp[i] == -1 dp[i] dp i -1 1 {
                dp[i] = 0;
            } dp[i] = 0 dp[i] dp i 0 {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            } if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod; i == 1 i 1 {
                    dp[i] = 1;
                } dp[i] = 1 dp[i] dp i 1 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[n]) System.out.println System.out System System.out dp[n] dp n sc.close() sc.close sc String[] args args public class Main {
    //Typical Stairs
    //DP?
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();
        int[] dp = new int[n + 1];
        dp[0] = 1;
        int mod = 1000000007;
        for (int i = 1; i <= m; i++) dp[sc.nextInt()] = -1;
        for (int i = 1; i <= n; i++) {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
} public class Main {
    //Typical Stairs
    //DP?
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();
        int[] dp = new int[n + 1];
        dp[0] = 1;
        int mod = 1000000007;
        for (int i = 1; i <= m; i++) dp[sc.nextInt()] = -1;
        for (int i = 1; i <= n; i++) {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
} Main
import java.util.*;

public class Main {
    //Typical Stairs
    //DP?
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();
        int[] dp = new int[n + 1];
        dp[0] = 1;
        int mod = 1000000007;
        for (int i = 1; i <= m; i++) dp[sc.nextInt()] = -1;
        for (int i = 1; i <= n; i++) {
            if (dp[i] == -1) {
                dp[i] = 0;
            } else {
                if (i == 1) {
                    dp[i] = 1;
                } else dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
            }
        }
        System.out.println(dp[n]);
        sc.close();
    }
}
