#!/usr/bin/env python3
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
f = lambda j: j not in a

mod = 10**9+7

dp = [0] * -~n
dp[0] = 1
dp[1] = f(1)

for i in range(2, -~n):
    dp[i] += (dp[i - 1] + dp[i - 2]) * f(i) % mod

print(dp[n])