N, M = map(int, input().split())
ana = [0] * M
for i in range(M):
  ana[i] = input()
ans = [0] * N
ans[0] = 1# 一段目まで登る方法は一通り
ans[1] = 2# 二段目まで登る方法は二通り
 
for i in range(2,N):
    tmp = i+1
    tmp2 = str(tmp)
    if tmp2 in ana:
        continue
    else:
        ans[i] = (ans[i-1] + ans[i-2]) % 1000000007
 
print(ans[N-1])