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
alis = [a2,a1]
for i in range(2,N+1):
    a = 0 if i in A else alis[-2]+alis[-1]
    alis.append(a)
print(1 if N == 1 else alis[-1]%1000000007)
