from sys import stdin
import numpy as np

n,m = [int(x) for x in stdin.readline().rstrip().split()]

lin = np.array([0]*(n+1))

if m != 0:
    for i in range(m):
        lin[int(stdin.readline().rstrip())] = -1

dp = np.array([-1]*(n+1))

dp[0] = 1

if lin[1] == -1:
    dp[1] = 0
else:
    dp[1] = 1

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

print(int(dp[n]%(10**9+7)))