def main():
    mod = 1000000007
    N, M, *A = map(int, open(0).read().split())
    F = [0] * (N + 1)
    # A.sort() 制約で単調性は保証されている
    F[0] = 1
    if not A[0] == 1:
        F[1] = 1
    for i in range(2, N + 1):
        if i not in A:
            F[i] = (F[i-1] + F[i-2]) % mod
    print(F[-1])


if __name__ == "__main__":
    main()
