

def f(i):

    if(dp[i] != -1):
        return dp[i]
    if(i==n or i==n-1):
        return 1
    if e[i] != 1:
        return 0
    else:
        dp[i] = f(i+1) + f(i+2)
        return dp[i]


n,m = list(map(int,input().split()))
e = [1] * n
dp = [-1] * n
dp.append(-1)

for i in range(m):
    e[int(input())] = 0
print(f(0) % 1000000007)