MOD = 10**9 + 7

import sys
input = sys.stdin.readline

n, m = map(int, input().split())
a = []
for _ in range(m):
    a.append(int(input()))

# i段目にたどり着く方法
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1 if 1 not in a else 0

for i in range(2, n+1):
    dp[i] = (dp[i-1] + dp[i-2]) % MOD if i not in a else 0

print(dp[-1])