a,b = map(int,input().split())
s =[0]*(b+1)
flag = 0
p = [0]*b
goukei = 0
for i in range(b):
  p[i] = int(input())
for k in range(1,b):
  if (p[k] - p[k-1]-1) == 0:
    flag = 1
for l in range(b+1):
  if l == 0:
    s[l] = p[l] -1
  elif l == b:
    s[l] = a - p[l-1]
  else:
    s[l] = p[l] - p[l-1]-1
counter = 0
def fib(n):
    memo = [0] * n
    memo[0:2] = [0, 1]
    for i in range(2, n):
        memo[i] = memo[i - 1] + memo[i - 2]
    return memo[n-1]
if flag == 0:
  for f in range(len(s)):
    goukei += fib(s[f]+2)
  print(goukei%1000000007)
else:
  print(0)