#!/usr/bin/env python
# coding: utf-8

# In[9]:


N,M = map(int, input().split())
alist = []
for _ in range(M):
    alist.append(int(input()))


# In[11]:


dp = [0]*(N+1)
dp[0] = 1
if N == 1:
    ans = 1
else:
    if 1 in alist:
        dp[1] = 0
    else:
        dp[1] = 1
    for i in range(2,N+1):
        dp[i] = dp[i-1] + dp[i-2]
        if i in alist:
            dp[i] = 0
print(dp[-1]%1000000007)


# In[ ]:




