# -*- coding: utf-8 -*-
#ABC130C
import sys


tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))
n=hoge[0]
m=hoge[1]

a=[]
for i in range(0,n):
	a.append(1)

#print(a)

for i in range(0,m):
	tmp = int(input())
	a[tmp]=0

#print(a)

for i in range(2,n):
	a[i]=a[i]*(a[i-1]+a[i-2])


print((a[n-1]+a[n-2])% 1000000007)


