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

# In[15]:


from collections import deque


# In[38]:


N,M = map(int, input().split())
alist = [False]*N
for _ in range(M):
    alist[int(input())-1] = True


# In[41]:


dp = deque([0]*2)
dp[0] = 1
ans = 0
mod = 10**9+7
if N == 1:
    ans = 1
else:
    if alist[0]:
        dp[1] = 0
    else:
        dp[1] = 1
    for i in range(2,N+1):
        if alist[i-1]:
            dp.append(0)
        else:
            dp.append((dp[0]+dp[1])%mod)
        dp.popleft()
    ans = dp[-1]
print(ans)


# In[ ]:



 from collections import deque N,M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M alist = [False]*N alist [False]*N [False] False N for _ in range(M):
    alist[int(input())-1] = True


# In[41]: _ range(M) range M alist[int(input())-1] = True alist[int(input())-1] alist int(input())-1 int(input()) int input() input 1 True dp = deque([0]*2) dp deque([0]*2) deque [0]*2 [0] 0 2 dp[0] = 1 dp[0] dp 0 1 ans = 0 ans 0 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 if N == 1:
    ans = 1
else:
    if alist[0]:
        dp[1] = 0
    else:
        dp[1] = 1
    for i in range(2,N+1):
        if alist[i-1]:
            dp.append(0)
        else:
            dp.append((dp[0]+dp[1])%mod)
        dp.popleft()
    ans = dp[-1] N == 1 N 1 ans = 1 ans 1 if alist[0]:
        dp[1] = 0
    else:
        dp[1] = 1
     alist[0] alist 0 dp[1] = 0 dp[1] dp 1 0 dp[1] = 1 dp[1] dp 1 1 for i in range(2,N+1):
        if alist[i-1]:
            dp.append(0)
        else:
            dp.append((dp[0]+dp[1])%mod)
        dp.popleft()
     i range(2,N+1) range 2 N+1 N 1 if alist[i-1]:
            dp.append(0)
        else:
            dp.append((dp[0]+dp[1])%mod)
         alist[i-1] alist i-1 i 1 dp.append(0) dp.append dp append 0 dp.append((dp[0]+dp[1])%mod) dp.append dp append (dp[0]+dp[1])%mod dp[0]+dp[1] dp[0] dp 0 dp[1] dp 1 mod dp.popleft() dp.popleft dp popleft ans = dp[-1] ans dp[-1] dp -1 print(ans) print ans dp = deque([0]*2) deque([0]*2) dp ans = 0 0 ans mod = 10**9+7 10**9+7 mod alist = [False]*N [False]*N alist N,M = map(int, input().split()) map(int, input().split()) N ans = dp[-1] dp[-1] ans ans = 1 1 ans M = map(int, input().split()) map(int, input().split()) M
#!/usr/bin/env python
# coding: utf-8

# In[15]:


from collections import deque


# In[38]:


N,M = map(int, input().split())
alist = [False]*N
for _ in range(M):
    alist[int(input())-1] = True


# In[41]:


dp = deque([0]*2)
dp[0] = 1
ans = 0
mod = 10**9+7
if N == 1:
    ans = 1
else:
    if alist[0]:
        dp[1] = 0
    else:
        dp[1] = 1
    for i in range(2,N+1):
        if alist[i-1]:
            dp.append(0)
        else:
            dp.append((dp[0]+dp[1])%mod)
        dp.popleft()
    ans = dp[-1]
print(ans)


# In[ ]:




