N, M = map(int,input().split())
a = list(int(input()) for i in range(M))
a.append(N+1)

if a[0] = 0:
  print(0)
  exit()
#パターン数はフィボナッチ数列で通り数が増える
def Fib(n):
    a, b = 1, 1
    if n == 1:
        return a
    elif n == 2:
        return b
    else:
        for i in range(n-2):
            a, b = b, a + b
        return b
#aとa+1の間の距離nに対して、フィボナッチ数列n+1番目数のパターンが有る
ans = 1
if M > 1:
    for i in range(len(a)-1):
        n = a[i+1]-a[i]-1 #間の距離n
        if n == 0:
            print(0)
            exit()
        ans = ans*Fib(n+1)%1000000007
        i += 1
    print(ans)
elif M == 1:
    print(Fib(a[0])%1000000007 * Fib(N-a[0])%1000000007)
elif M == 0:
    print(Fib(N)%1000000007)