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)
dp[0] = 1
if 1 not in alist:
    dp[1] = 1
for i in range(2,N+1):
    if i <= N and i not in alist:
        dp[i] += dp[i-1] + dp[i-2]

print(dp[N]%1000000007)
