from collections import deque
import sys
import functools
sys.setrecursionlimit(10000000000)
@functools.lru_cache(maxsize=None)
def stairs(n):
  if n==1:
    return 1
  if n==2:
    return 2
  return stairs(n-1)+stairs(n-2)
N,M=map(int,input().split())
A=deque()
for _ in range(M):
  A.append(int(input()))
pos=0
ans=0
while A:
  x=A.popleft()-1
  if len(A)!=0:
    if x+2==A[0]:
      print(0)
      exit()
  ans+=(stairs(x-pos)-1)
  ans%=1000000007
  pos=x+2
ans+=stairs(N-pos)
print(ans+1)