modulo=10**9+7
n, m=map(int, input().split())
a_list=[]
for i in range(m):
    a=int(input())
    a_list.append(a)
dp=[0 for i in range(n+1)]#0~n
dp[0]=1
if a_list[0]==1:
    dp[1]=0
else:
    dp[1]=1

for i in range(2, n+1):
    if not i in a_list:
        dp[i]=dp[i-2]+dp[i-1]
print(dp[n]%modulo)
