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

# In[15]:


from collections import deque


# In[9]:


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


# In[18]:


dp = deque([0]*2)
dp[0] = 1
ans = 0
mod = 1000000007
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.append((dp[i-1] + dp[i-2])%mod)
        if i in alist:
            dp[-1] = 0
        dp.popleft
    ans = dp[-1]
print(ans)


# In[ ]:




