import sys
sys.setrecursionlimit(10000)

N,M = map(int, input().split())
a = [int(input()) for i in range(M)]

def fib(n):
        a, b = 0, 1
        for i in range(n):
            a, b = b, a + b
        return b if n >= 0 else 0

if M == 0:
    print(fib(N))
    exit()
'''
flag = 0
if M >= 2:
    for i in range(M-1):
        if a[i+1] - a[i] == 1:
            flag += 1
    if flag >= 1:
        print(0)
        exit()
'''
ans = fib(a[0]-1)
for i in range(M-1):
    ans = (ans * fib(a[i+1]-a[i]-2))%(10**9+7)

ans = (ans * fib(N-a[-1]-1))%(10**9+7)

print(ans)