import numpy as np
import sys
input = sys.stdin.readline

N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
         
mat = np.array([[1, 1],[1, 0]])
n = np.array([[1, 1],[1, 0]])

cnt = 2
if 1in a:n[0, 1] = 0

while cnt!=N+1:
    if cnt-1 in a:n[0, 0]=0
    n = np.dot(n, mat) 
    cnt += 1
    if n[0, 0]==0:break

print(n[0, 0]%(10**9+7))