import sys
sys.setrecursionlimit(10000)
N,M=map(int,input().split())
L=[int(input()) for _ in range(M)]
ans=0

def dfs(i):
	global ans
	if i==N:
		ans+=1
		return True
	if i>N:return False
	if i in L:return True
	if dfs(i+1)==False:return True
	if dfs(i+2)==False:return True

dfs(0)
print(ans%1000000007) 