N, M = map(int, input().split())
  
broken_step = []
for _ in range(M):
    broken_step.append(int(input()))
      
import sys
sys.setrecursionlimit(10000000)

mod = 1000000007

memo = [-1] * (N+1)

def step_memo(N):
    if N == 0 and N not in broken_step:
        memo[N] = 1
        return 1
    elif N == 0 and N in broken_step:
        memo[N] = 0
        return 0
    
    if N == 1 and N not in broken_step:
        memo[N] = 1
        return 1
    elif N == 1 and N in broken_step:
        memo[N] = 0
        return 0

    a = 1
    b = 1
    
    if N in broken_step:
        a, b = 0, 0
        
    if memo[N] != -1:
        return memo[N]
    
    memo[N] =  (a * step_memo(N-1) + b * step_memo(N-2)) % mod
    return (a * step_memo(N-1) + b * step_memo(N-2)) % mod

print(step_memo(N))