import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

N,M = inpl()

alist = list()
for _ in range(M):
    alist.append(int(input()))

dp = [0]*(N+1)

for i in range(N+1):
    if i <= N and i not in alist:
        if i == 0 :
            dp[i] = 1
        elif i < 2:
            dp[i] += dp[i-1]
        elif i <= N:
            dp[i] += dp[i-1]
            dp[i] += dp[i-2]


print(dp[N]%1000000007)
