N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
         
n = [1, 1]
  
for i in range(2, N+1):
    if i-2 in a:n[i-2]=0
    if i-1 in a:n[i-1]=0
    n.append(n[i-2]+n[i-1])

print(n[-1]%(10**9+7))