N, M = map(int, input().split())
dp = [0] * N
for _ in range(M):
    a = int(input())
    dp[a-1] = -1

k = 1000000007

if dp[0] == 0 and dp[1] == 0:
    dp[0] = 1
    dp[1] = 2

if dp[0] == -1 and dp[1] == 0:
    dp[0] = 0
    dp[1] = 1


if dp[0] == 0 and dp[1] == -1:
    dp[0] = 1
    dp[1] = 0


if dp[0] == -1 and dp[1] == -1:
    dp[0] = 0
    dp[1] = 0


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

n = dp[-1] % k

print(n)
