import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    public static final BigInteger ZERO = BigInteger.ZERO;
    public static final BigInteger ONE = BigInteger.ONE;
    public static final BigInteger TWO = ONE.add(ONE);

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int [] Ai = new int[N+1];

        for (int i = 0; i < M; i++) {

            Ai[Integer.parseInt(sc.next())] = -1;
        }

        sc.close();

        BigInteger ans = fanc(N,Ai);

        System.out.println(ans.remainder(BigInteger.valueOf(1000000007)));
    }

    public static BigInteger fanc(int N, int[] Ai) {

        BigInteger[] dp = new BigInteger[N+1];

        dp[0] = ONE;
        dp[1] = (Ai[1] == -1) ? ZERO : ONE;

        for (int i = 2; i <= N; i++ )  {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        }

        return dp[N];
    }
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {

    public static final BigInteger ZERO = BigInteger.ZERO;
    public static final BigInteger ONE = BigInteger.ONE;
    public static final BigInteger TWO = ONE.add(ONE);

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int [] Ai = new int[N+1];

        for (int i = 0; i < M; i++) {

            Ai[Integer.parseInt(sc.next())] = -1;
        }

        sc.close();

        BigInteger ans = fanc(N,Ai);

        System.out.println(ans.remainder(BigInteger.valueOf(1000000007)));
    }

    public static BigInteger fanc(int N, int[] Ai) {

        BigInteger[] dp = new BigInteger[N+1];

        dp[0] = ONE;
        dp[1] = (Ai[1] == -1) ? ZERO : ONE;

        for (int i = 2; i <= N; i++ )  {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        }

        return dp[N];
    }
} Main public static final BigInteger ZERO = BigInteger.ZERO; ZERO BigInteger.ZERO BigInteger BigInteger.ZERO public static final BigInteger ONE = BigInteger.ONE; ONE BigInteger.ONE BigInteger BigInteger.ONE public static final BigInteger TWO = ONE.add(ONE); TWO ONE.add(ONE) ONE.add ONE ONE public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int [] Ai = new int[N+1];

        for (int i = 0; i < M; i++) {

            Ai[Integer.parseInt(sc.next())] = -1;
        }

        sc.close();

        BigInteger ans = fanc(N,Ai);

        System.out.println(ans.remainder(BigInteger.valueOf(1000000007)));
    } main {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int [] Ai = new int[N+1];

        for (int i = 0; i < M; i++) {

            Ai[Integer.parseInt(sc.next())] = -1;
        }

        sc.close();

        BigInteger ans = fanc(N,Ai);

        System.out.println(ans.remainder(BigInteger.valueOf(1000000007)));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int [] Ai = new int[N+1]; Ai new int[N+1] N+1 N 1 for (int i = 0; i < M; i++) {

            Ai[Integer.parseInt(sc.next())] = -1;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {

            Ai[Integer.parseInt(sc.next())] = -1;
        } {

            Ai[Integer.parseInt(sc.next())] = -1;
        } Ai[Integer.parseInt(sc.next())] = -1 Ai[Integer.parseInt(sc.next())] Ai Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc -1 1 sc.close() sc.close sc BigInteger ans = fanc(N,Ai); ans fanc(N,Ai) fanc N Ai System.out.println(ans.remainder(BigInteger.valueOf(1000000007))) System.out.println System.out System System.out ans.remainder(BigInteger.valueOf(1000000007)) ans.remainder ans BigInteger.valueOf(1000000007) BigInteger.valueOf BigInteger 1000000007 String[] args args public static BigInteger fanc(int N, int[] Ai) {

        BigInteger[] dp = new BigInteger[N+1];

        dp[0] = ONE;
        dp[1] = (Ai[1] == -1) ? ZERO : ONE;

        for (int i = 2; i <= N; i++ )  {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        }

        return dp[N];
    } fanc {

        BigInteger[] dp = new BigInteger[N+1];

        dp[0] = ONE;
        dp[1] = (Ai[1] == -1) ? ZERO : ONE;

        for (int i = 2; i <= N; i++ )  {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        }

        return dp[N];
    } BigInteger[] dp = new BigInteger[N+1]; dp new BigInteger[N+1] N+1 N 1 dp[0] = ONE dp[0] dp 0 ONE dp[1] = (Ai[1] == -1) ? ZERO : ONE dp[1] dp 1 (Ai[1] == -1) ? ZERO : ONE (Ai[1] == -1) Ai[1] Ai 1 -1 1 ZERO ONE for (int i = 2; i <= N; i++ )  {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        } int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        } {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        } dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2] dp[i-2] dp i-2 i 2 (Ai[i-2] == -1) ? ZERO : dp[i-2] (Ai[i-2] == -1) Ai[i-2] Ai i-2 i 2 -1 1 ZERO dp[i-2] dp i-2 i 2 dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1] dp[i-1] dp i-1 i 1 (Ai[i-1] == -1) ? ZERO : dp[i-1] (Ai[i-1] == -1) Ai[i-1] Ai i-1 i 1 -1 1 ZERO dp[i-1] dp i-1 i 1 dp[i] = dp[i-2].add(dp[i-1]) dp[i] dp i dp[i-2].add(dp[i-1]) dp[i-2].add dp[i-2] dp i-2 i 2 dp[i-1] dp i-1 i 1 return dp[N]; dp[N] dp N int N N int[] Ai Ai public class Main {

    public static final BigInteger ZERO = BigInteger.ZERO;
    public static final BigInteger ONE = BigInteger.ONE;
    public static final BigInteger TWO = ONE.add(ONE);

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int [] Ai = new int[N+1];

        for (int i = 0; i < M; i++) {

            Ai[Integer.parseInt(sc.next())] = -1;
        }

        sc.close();

        BigInteger ans = fanc(N,Ai);

        System.out.println(ans.remainder(BigInteger.valueOf(1000000007)));
    }

    public static BigInteger fanc(int N, int[] Ai) {

        BigInteger[] dp = new BigInteger[N+1];

        dp[0] = ONE;
        dp[1] = (Ai[1] == -1) ? ZERO : ONE;

        for (int i = 2; i <= N; i++ )  {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        }

        return dp[N];
    }
} public class Main {

    public static final BigInteger ZERO = BigInteger.ZERO;
    public static final BigInteger ONE = BigInteger.ONE;
    public static final BigInteger TWO = ONE.add(ONE);

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int [] Ai = new int[N+1];

        for (int i = 0; i < M; i++) {

            Ai[Integer.parseInt(sc.next())] = -1;
        }

        sc.close();

        BigInteger ans = fanc(N,Ai);

        System.out.println(ans.remainder(BigInteger.valueOf(1000000007)));
    }

    public static BigInteger fanc(int N, int[] Ai) {

        BigInteger[] dp = new BigInteger[N+1];

        dp[0] = ONE;
        dp[1] = (Ai[1] == -1) ? ZERO : ONE;

        for (int i = 2; i <= N; i++ )  {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        }

        return dp[N];
    }
} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    public static final BigInteger ZERO = BigInteger.ZERO;
    public static final BigInteger ONE = BigInteger.ONE;
    public static final BigInteger TWO = ONE.add(ONE);

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int [] Ai = new int[N+1];

        for (int i = 0; i < M; i++) {

            Ai[Integer.parseInt(sc.next())] = -1;
        }

        sc.close();

        BigInteger ans = fanc(N,Ai);

        System.out.println(ans.remainder(BigInteger.valueOf(1000000007)));
    }

    public static BigInteger fanc(int N, int[] Ai) {

        BigInteger[] dp = new BigInteger[N+1];

        dp[0] = ONE;
        dp[1] = (Ai[1] == -1) ? ZERO : ONE;

        for (int i = 2; i <= N; i++ )  {

            dp[i-2] = (Ai[i-2] == -1) ? ZERO : dp[i-2];
            dp[i-1] = (Ai[i-1] == -1) ? ZERO : dp[i-1];

            dp[i] = dp[i-2].add(dp[i-1]);
        }

        return dp[N];
    }
}