N, M = map(int, raw_input().split())
A = []
A = [0 for i in range(N + 1)]
for i in range(M):
    a = int(raw_input())
    A[a] = -1

dp = []
dp = [0 for i in range(N + 1)]
dp[0] = 1

for i in range(N):
    if (i + 1) <= N and A[i + 1] == 0:
        dp[i + 1] += dp[i]
    if (i + 2) <= N and A[i + 2] == 0:
        dp[i + 2] += dp[i]


print str(dp[N]%1000000007)