import java.util.Scanner;

public class Main {
    static final int MODULUS = 1_000_000_007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] a = new int[M];
        for (int i = 0; i < a.length; ++i) {
            a[i] = sc.nextInt();
        }

        System.out.println(solve(N, a));

        sc.close();
    }

    static int solve(int N, int[] a) {
        int[] wayNums = new int[N + 1];
        wayNums[0] = 1;

        boolean[] brokens = new boolean[N + 1];
        for (int ai : a) {
            brokens[ai] = true;
        }

        for (int i = 0; i < wayNums.length; ++i) {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        }

        return wayNums[N];
    }

    static int addMod(int x, int y) {
        return (x + y) % MODULUS;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    static final int MODULUS = 1_000_000_007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] a = new int[M];
        for (int i = 0; i < a.length; ++i) {
            a[i] = sc.nextInt();
        }

        System.out.println(solve(N, a));

        sc.close();
    }

    static int solve(int N, int[] a) {
        int[] wayNums = new int[N + 1];
        wayNums[0] = 1;

        boolean[] brokens = new boolean[N + 1];
        for (int ai : a) {
            brokens[ai] = true;
        }

        for (int i = 0; i < wayNums.length; ++i) {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        }

        return wayNums[N];
    }

    static int addMod(int x, int y) {
        return (x + y) % MODULUS;
    }
} Main static final int MODULUS = 1_000_000_007; MODULUS 1_000_000_007 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] a = new int[M];
        for (int i = 0; i < a.length; ++i) {
            a[i] = sc.nextInt();
        }

        System.out.println(solve(N, a));

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] a = new int[M];
        for (int i = 0; i < a.length; ++i) {
            a[i] = sc.nextInt();
        }

        System.out.println(solve(N, a));

        sc.close();
    } 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[] a = new int[M]; a new int[M] M for (int i = 0; i < a.length; ++i) {
            a[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length ++i ++i i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc System.out.println(solve(N, a)) System.out.println System.out System System.out solve(N, a) solve N a sc.close() sc.close sc String[] args args static int solve(int N, int[] a) {
        int[] wayNums = new int[N + 1];
        wayNums[0] = 1;

        boolean[] brokens = new boolean[N + 1];
        for (int ai : a) {
            brokens[ai] = true;
        }

        for (int i = 0; i < wayNums.length; ++i) {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        }

        return wayNums[N];
    } solve {
        int[] wayNums = new int[N + 1];
        wayNums[0] = 1;

        boolean[] brokens = new boolean[N + 1];
        for (int ai : a) {
            brokens[ai] = true;
        }

        for (int i = 0; i < wayNums.length; ++i) {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        }

        return wayNums[N];
    } int[] wayNums = new int[N + 1]; wayNums new int[N + 1] N + 1 N 1 wayNums[0] = 1 wayNums[0] wayNums 0 1 boolean[] brokens = new boolean[N + 1]; brokens new boolean[N + 1] N + 1 N 1 for (int ai : a) {
            brokens[ai] = true;
        } int ai a {
            brokens[ai] = true;
        } {
            brokens[ai] = true;
        } brokens[ai] = true brokens[ai] brokens ai true for (int i = 0; i < wayNums.length; ++i) {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        } int i = 0; int i = 0; i 0 i < wayNums.length i wayNums.length wayNums wayNums.length ++i ++i i {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        } {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        } for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            } int j = 1; int j = 1; j 1 j <= 2 j 2 ++j ++j j {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            } {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            } if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                } i + j < wayNums.length && !brokens[i + j] i + j < wayNums.length i + j i j wayNums.length wayNums wayNums.length !brokens[i + j] brokens[i + j] brokens i + j i j {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                } wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]) wayNums[i + j] wayNums i + j i j addMod(wayNums[i + j], wayNums[i]) addMod wayNums[i + j] wayNums i + j i j wayNums[i] wayNums i return wayNums[N]; wayNums[N] wayNums N int N N int[] a a static int addMod(int x, int y) {
        return (x + y) % MODULUS;
    } addMod {
        return (x + y) % MODULUS;
    } return (x + y) % MODULUS; (x + y) % MODULUS (x + y) x y MODULUS int x x int y y public class Main {
    static final int MODULUS = 1_000_000_007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] a = new int[M];
        for (int i = 0; i < a.length; ++i) {
            a[i] = sc.nextInt();
        }

        System.out.println(solve(N, a));

        sc.close();
    }

    static int solve(int N, int[] a) {
        int[] wayNums = new int[N + 1];
        wayNums[0] = 1;

        boolean[] brokens = new boolean[N + 1];
        for (int ai : a) {
            brokens[ai] = true;
        }

        for (int i = 0; i < wayNums.length; ++i) {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        }

        return wayNums[N];
    }

    static int addMod(int x, int y) {
        return (x + y) % MODULUS;
    }
} public class Main {
    static final int MODULUS = 1_000_000_007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] a = new int[M];
        for (int i = 0; i < a.length; ++i) {
            a[i] = sc.nextInt();
        }

        System.out.println(solve(N, a));

        sc.close();
    }

    static int solve(int N, int[] a) {
        int[] wayNums = new int[N + 1];
        wayNums[0] = 1;

        boolean[] brokens = new boolean[N + 1];
        for (int ai : a) {
            brokens[ai] = true;
        }

        for (int i = 0; i < wayNums.length; ++i) {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        }

        return wayNums[N];
    }

    static int addMod(int x, int y) {
        return (x + y) % MODULUS;
    }
} Main
import java.util.Scanner;

public class Main {
    static final int MODULUS = 1_000_000_007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] a = new int[M];
        for (int i = 0; i < a.length; ++i) {
            a[i] = sc.nextInt();
        }

        System.out.println(solve(N, a));

        sc.close();
    }

    static int solve(int N, int[] a) {
        int[] wayNums = new int[N + 1];
        wayNums[0] = 1;

        boolean[] brokens = new boolean[N + 1];
        for (int ai : a) {
            brokens[ai] = true;
        }

        for (int i = 0; i < wayNums.length; ++i) {
            for (int j = 1; j <= 2; ++j) {
                if (i + j < wayNums.length && !brokens[i + j]) {
                    wayNums[i + j] = addMod(wayNums[i + j], wayNums[i]);
                }
            }
        }

        return wayNums[N];
    }

    static int addMod(int x, int y) {
        return (x + y) % MODULUS;
    }
}