import math
mod = 10**9 + 7
import sys
sys.setrecursionlimit(2147483647)
input = sys.stdin.readline

N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]

pat = [0 for _ in range(N+1)]
pat[0] = 1
if 1 in a :
    pat[1] = 0
else :
    pat[1] = 1

for i in range(2,N+1) :
    if i in a :
        pat[i] = 0
    else :
        pat[i] = (pat[i-1] + pat[i-2])%mod

print(pat[N])
