def main():
    import queue
    n,m = map(int,input().split())
    A = []
    for _ in range(m):
        a = int(input())
        A.append(a)
    mod = 10**9+7
    q = queue.Queue()
    q.put(1)
    if 1 in A:
        q.put(0)
    else:
        q.put(1)
    for i in range(2,n+1):
        if i in A:
            q.get()
            q.put(0)
        else:
            a = q.get()
            b = q.get()
            q.put(b)
            q.put((a+b)%mod)

    q.get()
    print(q.get())

if __name__ == "__main__":
    main()