n,m = map(int,input().split())

s = [0]*(n+1)
for i in range(m):
    s[int(input())] = 1

mod = (10**9)+7
ans = 0

def steps(now):
    if now == n:
        global ans
        ans += 1
        ans %= mod
    else:
        if s[now+1] == 0:
            steps(now+1)
        if now+2 <= n:
            if s[now+2] == 0:
                steps(now+2)
            
steps(0)
print(ans)