import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final int MOD = 1000000007;
        final Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        final int[] a = new int[N+1];
        for (int i = 0; i < M; i++) {
            a[scanner.nextInt()] = -1;
        }
        a[0] = 1;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        }
        System.out.println(a[N] % MOD);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        final int MOD = 1000000007;
        final Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        final int[] a = new int[N+1];
        for (int i = 0; i < M; i++) {
            a[scanner.nextInt()] = -1;
        }
        a[0] = 1;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        }
        System.out.println(a[N] % MOD);
    }
} Main public static void main(String[] args) {
        final int MOD = 1000000007;
        final Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        final int[] a = new int[N+1];
        for (int i = 0; i < M; i++) {
            a[scanner.nextInt()] = -1;
        }
        a[0] = 1;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        }
        System.out.println(a[N] % MOD);
    } main {
        final int MOD = 1000000007;
        final Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        final int[] a = new int[N+1];
        for (int i = 0; i < M; i++) {
            a[scanner.nextInt()] = -1;
        }
        a[0] = 1;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        }
        System.out.println(a[N] % MOD);
    } final int MOD = 1000000007; MOD 1000000007 final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner final int[] a = new int[N+1]; a new int[N+1] N+1 N 1 for (int i = 0; i < M; i++) {
            a[scanner.nextInt()] = -1;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            a[scanner.nextInt()] = -1;
        } {
            a[scanner.nextInt()] = -1;
        } a[scanner.nextInt()] = -1 a[scanner.nextInt()] a scanner.nextInt() scanner.nextInt scanner -1 1 a[0] = 1 a[0] a 0 1 for (int i = 0; i < a.length; i++) {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        } {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        } if (a[i] == -1) continue; a[i] == -1 a[i] a i -1 1 continue; if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD; i+1 < a.length && a[i+1] != -1 i+1 < a.length i+1 i 1 a.length a a.length a[i+1] != -1 a[i+1] a i+1 i 1 -1 1 a[i + 1] = (a[i] + a[i + 1]) % MOD a[i + 1] a i + 1 i 1 (a[i] + a[i + 1]) % MOD (a[i] + a[i + 1]) a[i] a i a[i + 1] a i + 1 i 1 MOD if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            } i+2 < a.length && a[i+2] != -1 i+2 < a.length i+2 i 2 a.length a a.length a[i+2] != -1 a[i+2] a i+2 i 2 -1 1 {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            } a[i + 2] = (a[i] + a[i + 2]) % MOD a[i + 2] a i + 2 i 2 (a[i] + a[i + 2]) % MOD (a[i] + a[i + 2]) a[i] a i a[i + 2] a i + 2 i 2 MOD System.out.println(a[N] % MOD) System.out.println System.out System System.out a[N] % MOD a[N] a N MOD String[] args args public class Main {

    public static void main(String[] args) {
        final int MOD = 1000000007;
        final Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        final int[] a = new int[N+1];
        for (int i = 0; i < M; i++) {
            a[scanner.nextInt()] = -1;
        }
        a[0] = 1;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        }
        System.out.println(a[N] % MOD);
    }
} public class Main {

    public static void main(String[] args) {
        final int MOD = 1000000007;
        final Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        final int[] a = new int[N+1];
        for (int i = 0; i < M; i++) {
            a[scanner.nextInt()] = -1;
        }
        a[0] = 1;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        }
        System.out.println(a[N] % MOD);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final int MOD = 1000000007;
        final Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        final int[] a = new int[N+1];
        for (int i = 0; i < M; i++) {
            a[scanner.nextInt()] = -1;
        }
        a[0] = 1;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == -1) continue;
            if (i+1 < a.length && a[i+1] != -1)
                a[i + 1] = (a[i] + a[i + 1]) % MOD;
            if (i+2 < a.length && a[i+2] != -1) {
                a[i + 2] = (a[i] + a[i + 2]) % MOD;
            }
        }
        System.out.println(a[N] % MOD);
    }
}
