import sys

sys.setrecursionlimit(10 ** 6)

N, M = map(int, input().split())
A = []
for _ in range(M):
    a = int(input())
    A.append(a)

dp = []
for i in range(N + 1):
    dp.append(None)
dp.append(0)

dp[N] = 1

for i in range(N - 1, -1, -1):
    if i in A:
        dp[i] = 0
        continue
    dp[i] = dp[i + 1] + dp[i + 2]

# print('dp', dp)
print(dp[0] % 1000000007)
