N, M = map(int, raw_input().split())

s_flag = [True] * (N+1)

for m in xrange(M):
    a = int(raw_input())
    s_flag[a] = False

dp = [0] * (N+1)
dp[0] = 1
dp[1] = 1 if s_flag[1] else 0
for n in range(2, N+1):
    if s_flag[n]:
        dp[n] = (dp[n-1] + dp[n-2])% 1000000007

print dp[N]