import numpy as np
import math
N , M = map(int, input().split())
a = list()
for n in range(M):
    a.append(int(input()))
dp = np.zeros(N+1)
dp[0] = 1
dp[1] = 0 if a[0] == 1 else 1
for n in range(2,N+1):
    if n in a:
        dp[n] = 0
    else:
        dp[n] = (int(dp[n-1])+int(dp[n-2]))%(math.pow(10,9)+7)
print(int(dp[N]))
