import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n, m = map(int, input().split())
a = []
for _ in range(m):
    a.append(int(input()))

memo = {0:1}

for i in range(n):
    for j in range(i+1,min(i+2,n)+1):
        if j in a:
            continue
        if memo.get(i) is None:
            memo[i]=0
        if memo.get(j) is None:
            memo[j]=memo[i]
        else:
            memo[j]+=memo[i]
            


print(memo[n] % 1000000007)