# -*- coding: utf-8 -*-
import math
n, m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))

dp = [0 for _ in range(n)]
if 1 in a:
    dp[0] = 0
elif not 1 in a:
    dp[0] = 1
if n >= 2 and 2 in a:
    dp[1] = 0
elif n >= 2 and not 2 in a:
    dp[1] = dp[0] + 1

for i in range(2, n):
    if i + 1 in a:
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % (pow(10, 9) + 7)
#print(dp)
print(dp[n - 1] % (pow(10, 9) + 7))