import sys
input = sys.stdin.readline
 
N,M = list(map(int,input().split()))
A = [int(input()) for _ in range(M)]
 
a2 = 1
a1 = 0 if 1 in A else 1 
for i in range(2,N+1):
    a = 0 if i in A else (a2+a1)%1000000007
    a2 = a1
    a1 = a
print(1 if N == 1 else a%1000000007)
