from sys import stdin
from functools import reduce
from operator import add, mul

from functools import lru_cache
@lru_cache(maxsize=None)  # メモ化したい関数の前につける
def fib(n):  # n 番目のフィボナッチ数を求める関数
    if n <= 0:
        return 0
    elif n == 1:
        return 1
    else:
        return fib(n - 2) + fib(n - 1)


nm = [int(i) for i in stdin.readline().rstrip().split(" ")]
a = []
for i in range(nm[1]):
    a.append(int(stdin.readline().rstrip()))
result =[]
result.append(fib(a[0]))
for i in range(nm[1]-1):
    result.append(fib(a[i+1] - a[i] - 1))
result.append(fib(nm[0] - a[nm[1]-1]))
print(reduce(mul, result) % 1000000007)