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)

if 0 not in broken_step:
    memo[0] = 1
elif N == 0 and N in broken_step:
    memo[0] = 0

if 1 not in broken_step:
    memo[1] = 1
elif 1 in broken_step:
    memo[1] = 0

def step_memo(N):
    
    try:
        broken_step.remove(N)
        memo[N] = 0
        return 0
    except ValueError:
        pass
        
    #if N in broken_step:
    #    broken_step.remove(N)
    #    memo[N] = 0
    #    return 0
        
    if memo[N] != -1:
        return memo[N]
    
    memo[N] =  (step_memo(N-1) + step_memo(N-2)) % mod
    return (step_memo(N-1) + step_memo(N-2)) % mod
  
print(step_memo(N))
