mod = 10 ** 9 + 7
N, M = map(int, input().split())
a = []
for _ in range(M):
    a_m = int(input())
    if len(a) > 0 and a_m == a[-1] + 1:
        print(0)
        exit()
    a.append(a_m)

dp = [1]
if 1 not in a:
    dp.append(1)
else:
    dp.append(0)

for i in range(2, N + 1):
    if i not in a:
        tmp = dp[0] + dp[1]
    else:
        tmp = 0
    dp[0] = dp[1]
    dp[1] = tmp

print(dp[-1] % mod)