import sys
sys.setrecursionlimit(200000)

N, M = list(map(int, input().split()))
alist = []
for m in range(M) :
    alist.append(int(input()))

def stairs(n, a1, a2) :
    a0 = (a1 + a2)*int(n not in alist)%1000000007
    if n == N :
        return a0
    else :
        return stairs(n+1, a0, a1)
      
print(stairs(1, 1, 0))