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

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();

        int a[] = new int [m];
        for (int i = 0; i < m; i++) {
            a[i] = in.nextInt();
        }

        long step[] = new long[n + 3];
        Arrays.fill(step, 0);
        for (int i = 0; i < m; i++) {
            step[a[i]] = -1;
        }

        step[0] = 1;
        for (int i = 0; i <= n; i++) {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        }

        System.out.println(step[n]);
    }

    static final long MOD = 1_000_000_007;    

    static long modadd(long a, long b, long mod) {
        return (a + b) % mod;
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();

        int a[] = new int [m];
        for (int i = 0; i < m; i++) {
            a[i] = in.nextInt();
        }

        long step[] = new long[n + 3];
        Arrays.fill(step, 0);
        for (int i = 0; i < m; i++) {
            step[a[i]] = -1;
        }

        step[0] = 1;
        for (int i = 0; i <= n; i++) {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        }

        System.out.println(step[n]);
    }

    static final long MOD = 1_000_000_007;    

    static long modadd(long a, long b, long mod) {
        return (a + b) % mod;
    }
} Main static final long MOD = 1_000_000_007; MOD 1_000_000_007 public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();

        int a[] = new int [m];
        for (int i = 0; i < m; i++) {
            a[i] = in.nextInt();
        }

        long step[] = new long[n + 3];
        Arrays.fill(step, 0);
        for (int i = 0; i < m; i++) {
            step[a[i]] = -1;
        }

        step[0] = 1;
        for (int i = 0; i <= n; i++) {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        }

        System.out.println(step[n]);
    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();

        int a[] = new int [m];
        for (int i = 0; i < m; i++) {
            a[i] = in.nextInt();
        }

        long step[] = new long[n + 3];
        Arrays.fill(step, 0);
        for (int i = 0; i < m; i++) {
            step[a[i]] = -1;
        }

        step[0] = 1;
        for (int i = 0; i <= n; i++) {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        }

        System.out.println(step[n]);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in int a[] = new int [m]; a new int [m] m for (int i = 0; i < m; i++) {
            a[i] = in.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            a[i] = in.nextInt();
        } {
            a[i] = in.nextInt();
        } a[i] = in.nextInt() a[i] a i in.nextInt() in.nextInt in long step[] = new long[n + 3]; step new long[n + 3] n + 3 n 3 Arrays.fill(step, 0) Arrays.fill Arrays step 0 for (int i = 0; i < m; i++) {
            step[a[i]] = -1;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            step[a[i]] = -1;
        } {
            step[a[i]] = -1;
        } step[a[i]] = -1 step[a[i]] step a[i] a i -1 1 step[0] = 1 step[0] step 0 1 for (int i = 0; i <= n; i++) {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        } int i = 0; int i = 0; i 0 i <= n i n i++ i++ i {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        } {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        } if (step[i] == -1) continue; step[i] == -1 step[i] step i -1 1 continue; if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD); step[i + 1] != -1 step[i + 1] step i + 1 i 1 -1 1 step[i + 1] = modadd(step[i + 1], step[i], MOD) step[i + 1] step i + 1 i 1 modadd(step[i + 1], step[i], MOD) modadd step[i + 1] step i + 1 i 1 step[i] step i MOD if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD); step[i + 2] != -1 step[i + 2] step i + 2 i 2 -1 1 step[i + 2] = modadd(step[i + 2], step[i], MOD) step[i + 2] step i + 2 i 2 modadd(step[i + 2], step[i], MOD) modadd step[i + 2] step i + 2 i 2 step[i] step i MOD System.out.println(step[n]) System.out.println System.out System System.out step[n] step n String[] args args static long modadd(long a, long b, long mod) {
        return (a + b) % mod;
    } modadd {
        return (a + b) % mod;
    } return (a + b) % mod; (a + b) % mod (a + b) a b mod long a a long b b long mod mod public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();

        int a[] = new int [m];
        for (int i = 0; i < m; i++) {
            a[i] = in.nextInt();
        }

        long step[] = new long[n + 3];
        Arrays.fill(step, 0);
        for (int i = 0; i < m; i++) {
            step[a[i]] = -1;
        }

        step[0] = 1;
        for (int i = 0; i <= n; i++) {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        }

        System.out.println(step[n]);
    }

    static final long MOD = 1_000_000_007;    

    static long modadd(long a, long b, long mod) {
        return (a + b) % mod;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();

        int a[] = new int [m];
        for (int i = 0; i < m; i++) {
            a[i] = in.nextInt();
        }

        long step[] = new long[n + 3];
        Arrays.fill(step, 0);
        for (int i = 0; i < m; i++) {
            step[a[i]] = -1;
        }

        step[0] = 1;
        for (int i = 0; i <= n; i++) {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        }

        System.out.println(step[n]);
    }

    static final long MOD = 1_000_000_007;    

    static long modadd(long a, long b, long mod) {
        return (a + b) % mod;
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();

        int a[] = new int [m];
        for (int i = 0; i < m; i++) {
            a[i] = in.nextInt();
        }

        long step[] = new long[n + 3];
        Arrays.fill(step, 0);
        for (int i = 0; i < m; i++) {
            step[a[i]] = -1;
        }

        step[0] = 1;
        for (int i = 0; i <= n; i++) {
            if (step[i] == -1) continue;
            if (step[i + 1] != -1) step[i + 1] = modadd(step[i + 1], step[i], MOD);
            if (step[i + 2] != -1) step[i + 2] = modadd(step[i + 2], step[i], MOD);
        }

        System.out.println(step[n]);
    }

    static final long MOD = 1_000_000_007;    

    static long modadd(long a, long b, long mod) {
        return (a + b) % mod;
    }
}