import numpy as np

n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
div = 1000000007
arr = [1 ,2]
for i in range(2, n):
    arr.append(int(arr[i - 2] + arr[i - 1]))
ans = []

for i in range(m):
    if i == 0:
        if a[i] > 1:
            ans.append(a[i] - 1)
        else:
            ans.append(1)
    elif i < m:
        ans.append(a[i] - a[i-1] - 1)
ans.append(n - a[-1] - 1)

if m == 0:
    print(ans[-1])
else:
    b = 1
    for i in ans:
        if i == 0:
            b *= 0
        else:
            b *= arr[i-1]
    print(b % div)
