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

public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[m];
        for (int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
        }
        long MOD = (long) 1e9 + 7;

        long[] dp = new long[n + 2];
        dp[0] = 1;
        // dp[i] ... i段目にたどり着く数
        int currentIdx = 0;
        for (int i = 0; i < n; i++) {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        }
        System.out.println(dp[n] % MOD);
    }


    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[m];
        for (int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
        }
        long MOD = (long) 1e9 + 7;

        long[] dp = new long[n + 2];
        dp[0] = 1;
        // dp[i] ... i段目にたどり着く数
        int currentIdx = 0;
        for (int i = 0; i < n; i++) {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        }
        System.out.println(dp[n] % MOD);
    }


    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} Main void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[m];
        for (int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
        }
        long MOD = (long) 1e9 + 7;

        long[] dp = new long[n + 2];
        dp[0] = 1;
        // dp[i] ... i段目にたどり着く数
        int currentIdx = 0;
        for (int i = 0; i < n; i++) {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        }
        System.out.println(dp[n] % MOD);
    } run {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[m];
        for (int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
        }
        long MOD = (long) 1e9 + 7;

        long[] dp = new long[n + 2];
        dp[0] = 1;
        // dp[i] ... i段目にたどり着く数
        int currentIdx = 0;
        for (int i = 0; i < n; i++) {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        }
        System.out.println(dp[n] % MOD);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] arr = new int[m]; arr new int[m] m for (int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            arr[i] = sc.nextInt();
        } {
            arr[i] = sc.nextInt();
        } arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc long MOD = (long) 1e9 + 7; MOD (long) 1e9 + 7 (long) 1e9 7 long[] dp = new long[n + 2]; dp new long[n + 2] n + 2 n 2 dp[0] = 1 dp[0] dp 0 1 int currentIdx = 0; currentIdx 0 for (int i = 0; i < n; i++) {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        } {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        } if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            } currentIdx < m && i == arr[currentIdx] currentIdx < m currentIdx m i == arr[currentIdx] i arr[currentIdx] arr currentIdx {
                currentIdx++;
                continue;
            } currentIdx++ currentIdx continue; dp[i + 1] += dp[i] % MOD dp[i + 1] dp i + 1 i 1 dp[i] % MOD dp[i] dp i MOD dp[i + 2] += dp[i] % MOD dp[i + 2] dp i + 2 i 2 dp[i] % MOD dp[i] dp i MOD System.out.println(dp[n] % MOD) System.out.println System.out System System.out dp[n] % MOD dp[n] dp n MOD void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    } debug {
        System.err.println(Arrays.deepToString(os));
    } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[m];
        for (int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
        }
        long MOD = (long) 1e9 + 7;

        long[] dp = new long[n + 2];
        dp[0] = 1;
        // dp[i] ... i段目にたどり着く数
        int currentIdx = 0;
        for (int i = 0; i < n; i++) {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        }
        System.out.println(dp[n] % MOD);
    }


    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[m];
        for (int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
        }
        long MOD = (long) 1e9 + 7;

        long[] dp = new long[n + 2];
        dp[0] = 1;
        // dp[i] ... i段目にたどり着く数
        int currentIdx = 0;
        for (int i = 0; i < n; i++) {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        }
        System.out.println(dp[n] % MOD);
    }


    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} Main

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

public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[m];
        for (int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
        }
        long MOD = (long) 1e9 + 7;

        long[] dp = new long[n + 2];
        dp[0] = 1;
        // dp[i] ... i段目にたどり着く数
        int currentIdx = 0;
        for (int i = 0; i < n; i++) {
            if (currentIdx < m && i == arr[currentIdx]) {
                currentIdx++;
                continue;
            }
            dp[i + 1] += dp[i] % MOD;
            dp[i + 2] += dp[i] % MOD;
        }
        System.out.println(dp[n] % MOD);
    }


    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
}
