n,m= map(int,input().split())
a = [int(input()) for _ in range(m)]
d = [0]*(n+1)
if not 1 in a : d[1] = 1
if not 2 in a : d[2] = d[1] + 1
for i in range(3,n+1):
    if i not in a :
        d[i] = ( d[i-1] + d[i-2] ) % 1000000007
print(d[n])