n,m=map(int,input().split())
dp=[1]*n
mod=10**9+7
for i in range(m):
  a=int(input())
  dp[a-1]=0

ans=[]
ans.append(1 if dp[0]==1 else 0)
if dp[0]==1 and dp[1]==1:
    ans.append(2)
elif dp[0]==1 and dp[1]==0:
    ans.append(0)
elif dp[0]==0 and dp[1]==1:
    ans.append(1)
elif dp[0]==0 and dp[1]==0:
    print(0)
    exit()
for i in range(2,n):
    ans.append((ans[i-1]+ans[i-2])*dp[i]%mod)
print(ans[-1]%mod)