
from collections import defaultdict
import sys
sys.setrecursionlimit(100000)

N, M = map(int, input().rstrip().split(' '))

A = [0] * (N + 1)
for _ in range(M):
    A[int(input())] = 1

dp = defaultdict(lambda: -1)
def dfs(n):
    if n > N:
        return 0
    if A[n] == 1:
        return 0
    if n == N:
        return 1
    if dp[n] != -1:
        return dp[n]
        
    count = 0
    count += dfs(n + 1)
    count += dfs(n + 2)
    
    dp[n] = count
    
    return count
    
print(dfs(0) % (1000000007))