inf = 7 + (10 ** 9)
n, m = map(int, input().split())
dp = [0] * (n + 1)
out = []
dp[0] = 1
for _ in range(m):
    out.append(int(input()))
for i in range(n):
    if ((i + 1) not in out) & (i not in out):
        if i < n:
            dp[i + 1] = dp[i + 1] + dp[i]
    if ((i + 2) not in out) & (i not in out):
        if i + 1 < n:
            dp[i + 2] = dp[i + 2] + dp[i]
print(dp[-1] % inf)