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

# In[2]:


N, M = map(int, input().split())
As = [int(input()) for i in range(M)]
"""
100 5
1
23
45
67
89
"""


# In[6]:


stairs = [0]*(N+1)
stairs[0] = 1
for i in range(N):
    #if i == N-1:
    #    break
    if i <= N-1:
        if i+1 not in As:
            stairs[i+1] += stairs[i]
    if i <= N-2:
        if i+2 not in As:
            stairs[i+2] += stairs[i]
    
print(stairs[N]%1000000007)


# In[ ]:




