def fib_memo(n):
    memo=["EMPTY"]*(n+1)
    def _fib(n):
        if n == 1:
            return 0
        elif n == 2:
            return 1
        elif memo[n] != "EMPTY":
            return memo[n]
        else:
            memo[n] = _fib(n-1)+_fib(n-2)
            return memo[n]
    return _fib(n)
def fib(n):
    f = ((1 + 5**0.5) / 2)**n / 5**0.5 + 0.5
    return int(f)
  
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
if a:
  cnt=fib(a[0]+1)*fib(n-a[m-1]+1)
  for i in range(1,m):
    cnt*=fib(a[i]-a[i-1])
  print(cnt%(10**9+7))
else:
  print(fib_memo(n+2)%(10**9+7))
