n,m = map(int,input().split())
b = [] 
for i in range(n+1):
  if i == 0 or i == 1:
    b.appned(1)
  else:
    b.append(b[i-2]+b[i-1])

ans = 1
if m != 0:
  a = list(range(m))
  for i in range(m):
    a[i] = int(input())
    if i == 0:
      ans = ans*b[a[i]-1]%1000000007
    else:   
      ans = ans*b[a[i]-a[i-1]-2]%1000000007
  ans = ans*b[n-a[m-10]-1]%1000000007
  print(ans)
else:
  print(b[n]%1000000007)