import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
n,m=map(int,input().split())

a=[int(input()) for i in range(m)]

def fib(n):
    if n==1:
        return 1
    if n==2:
        return 2
    return fib(n-1)+fib(n-2)

ans=0
check=0
for i in a:
    if i-check==1:
        ans=0
        break
    ans+= fib(i-check-1)
    check=i
if ans!=0:
    ans+=fib(n-check-1)
print(ans%(10**+7))