a = list(map(int,input().split()))
b = list(int(input()) for i in range(a[1]))
a0=1
a1=1
a2=0
for i in range(2,a[0]+1):
  if i-2 in b:
    a0 = 0
  if i-1 in b:
    a1 = 0
  a2 = a1 + a0
  a0 = a1
  a1 = a2
print(a2%(10**9+7))