
import java.util.Scanner;

public class Main {
    private static long WARU = 1000000007;
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int count = scanner.nextInt();
        final int fallCount = scanner.nextInt();

        final long[] steps = new long[count + 1];

        for (int i = 1; i < steps.length; i++) {
            steps[i] = 0;
        }

        steps[0] = 1;

        for (int i = 0; i < fallCount; i++) {
            steps[scanner.nextInt()] = -1;
        }

        for (int i = 0; i < count; i++) {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        }

        System.out.println(steps[count] % WARU);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static long WARU = 1000000007;
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int count = scanner.nextInt();
        final int fallCount = scanner.nextInt();

        final long[] steps = new long[count + 1];

        for (int i = 1; i < steps.length; i++) {
            steps[i] = 0;
        }

        steps[0] = 1;

        for (int i = 0; i < fallCount; i++) {
            steps[scanner.nextInt()] = -1;
        }

        for (int i = 0; i < count; i++) {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        }

        System.out.println(steps[count] % WARU);
    }
} Main private static long WARU = 1000000007; WARU 1000000007 public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int count = scanner.nextInt();
        final int fallCount = scanner.nextInt();

        final long[] steps = new long[count + 1];

        for (int i = 1; i < steps.length; i++) {
            steps[i] = 0;
        }

        steps[0] = 1;

        for (int i = 0; i < fallCount; i++) {
            steps[scanner.nextInt()] = -1;
        }

        for (int i = 0; i < count; i++) {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        }

        System.out.println(steps[count] % WARU);
    } main {
        final Scanner scanner = new Scanner(System.in);
        final int count = scanner.nextInt();
        final int fallCount = scanner.nextInt();

        final long[] steps = new long[count + 1];

        for (int i = 1; i < steps.length; i++) {
            steps[i] = 0;
        }

        steps[0] = 1;

        for (int i = 0; i < fallCount; i++) {
            steps[scanner.nextInt()] = -1;
        }

        for (int i = 0; i < count; i++) {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        }

        System.out.println(steps[count] % WARU);
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final int count = scanner.nextInt(); count scanner.nextInt() scanner.nextInt scanner final int fallCount = scanner.nextInt(); fallCount scanner.nextInt() scanner.nextInt scanner final long[] steps = new long[count + 1]; steps new long[count + 1] count + 1 count 1 for (int i = 1; i < steps.length; i++) {
            steps[i] = 0;
        } int i = 1; int i = 1; i 1 i < steps.length i steps.length steps steps.length i++ i++ i {
            steps[i] = 0;
        } {
            steps[i] = 0;
        } steps[i] = 0 steps[i] steps i 0 steps[0] = 1 steps[0] steps 0 1 for (int i = 0; i < fallCount; i++) {
            steps[scanner.nextInt()] = -1;
        } int i = 0; int i = 0; i 0 i < fallCount i fallCount i++ i++ i {
            steps[scanner.nextInt()] = -1;
        } {
            steps[scanner.nextInt()] = -1;
        } steps[scanner.nextInt()] = -1 steps[scanner.nextInt()] steps scanner.nextInt() scanner.nextInt scanner -1 1 for (int i = 0; i < count; i++) {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        } int i = 0; int i = 0; i 0 i < count i count i++ i++ i {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        } {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        } if (steps[i] == -1) {
                continue;
            } steps[i] == -1 steps[i] steps i -1 1 {
                continue;
            } continue; if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            } i == count - 1 i count - 1 count 1 {
                steps[i + 1] += steps[i];
                break;
            } steps[i + 1] += steps[i] steps[i + 1] steps i + 1 i 1 steps[i] steps i break; if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            } steps[i + 1] == -1 && steps[i + 2] == -1 steps[i + 1] == -1 steps[i + 1] steps i + 1 i 1 -1 1 steps[i + 2] == -1 steps[i + 2] steps i + 2 i 2 -1 1 {
                System.out.println(0);
                return;
            } System.out.println(0) System.out.println System.out System System.out 0 return; if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            } steps[i + 2] != -1 steps[i + 2] steps i + 2 i 2 -1 1 {
                steps[i + 2] += steps[i] % WARU;
            } steps[i + 2] += steps[i] % WARU steps[i + 2] steps i + 2 i 2 steps[i] % WARU steps[i] steps i WARU if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            } steps[i + 1] != -1 steps[i + 1] steps i + 1 i 1 -1 1 {
                steps[i + 1] += steps[i] % WARU;
            } steps[i + 1] += steps[i] % WARU steps[i + 1] steps i + 1 i 1 steps[i] % WARU steps[i] steps i WARU System.out.println(steps[count] % WARU) System.out.println System.out System System.out steps[count] % WARU steps[count] steps count WARU final String[] args args public class Main {
    private static long WARU = 1000000007;
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int count = scanner.nextInt();
        final int fallCount = scanner.nextInt();

        final long[] steps = new long[count + 1];

        for (int i = 1; i < steps.length; i++) {
            steps[i] = 0;
        }

        steps[0] = 1;

        for (int i = 0; i < fallCount; i++) {
            steps[scanner.nextInt()] = -1;
        }

        for (int i = 0; i < count; i++) {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        }

        System.out.println(steps[count] % WARU);
    }
} public class Main {
    private static long WARU = 1000000007;
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int count = scanner.nextInt();
        final int fallCount = scanner.nextInt();

        final long[] steps = new long[count + 1];

        for (int i = 1; i < steps.length; i++) {
            steps[i] = 0;
        }

        steps[0] = 1;

        for (int i = 0; i < fallCount; i++) {
            steps[scanner.nextInt()] = -1;
        }

        for (int i = 0; i < count; i++) {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        }

        System.out.println(steps[count] % WARU);
    }
} Main

import java.util.Scanner;

public class Main {
    private static long WARU = 1000000007;
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int count = scanner.nextInt();
        final int fallCount = scanner.nextInt();

        final long[] steps = new long[count + 1];

        for (int i = 1; i < steps.length; i++) {
            steps[i] = 0;
        }

        steps[0] = 1;

        for (int i = 0; i < fallCount; i++) {
            steps[scanner.nextInt()] = -1;
        }

        for (int i = 0; i < count; i++) {
            if (steps[i] == -1) {
                continue;
            }

            if (i == count - 1) {
                steps[i + 1] += steps[i];
                break;
            }

            if (steps[i + 1] == -1 && steps[i + 2] == -1) {
                System.out.println(0);
                return;
            }

            if (steps[i + 2] != -1) {
                steps[i + 2] += steps[i] % WARU;
            }

            if (steps[i + 1] != -1) {
                steps[i + 1] += steps[i] % WARU;
            }
        }

        System.out.println(steps[count] % WARU);
    }
}
