import sys
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]

for i in range(1,m):
  if a[i]-a[i-1]==1:
    print('0')
    sys.exit()
    
if n==1:
  print('1')
  sys.exit()

def s(x):
    if x==1 or x==0:
        return x
    if x==2:
        return x
    return s(x-1)+s(x-2)
    
if m==0:
  print(s(n))
  sys.exit()

c=[]


for i in range(m):
  if i==0:
    p=s(a[i]-1)
    c.append(p)
  else:
    q=s(a[i]-a[i-1])
    c.append(q)
  r=s(n-(a[m-1]+1))
  c.append(r)

print(sum(c)%(10**9+7))
