n,m=map(int,input().split())
xs = [int(input()) for _ in range(m)]

broken = [False] * (n + 1)
for x in xs:
    broken[x] = True

cache = [-1] * (n + 1)

def solve(pos, n, broken, cache):
    if pos > n or broken[pos]:
        return 0
    if pos == n:
        return 1
    res = cache[pos]
    if res >= 0:
        return res
    res = solve(pos+1, n, broken, cache) + solve(pos+2, n, broken, cache)
    cache[pos] = res = res % 1000000007
    return res

print(solve(0,n,broken,cache))
