n,m = map(int,input().split())
broken = [int(input()) for i in range(m)]
def upstair(k):
    if k in broken:
        return 0
    if k == n-1:
        return 1
    if k == n-2:
        return 2
    return upstair(k+1)+upstair(k+2)
print(upstair(0)%(10**9 + 7))