n, m = map(int, input().split())

#通過できない階段をaに格納\n",
a = [int(input()) for _ in range(m)]
count = [0 for _ in range(n+1)]
count[0] = 1
for i in range(1,n+1):
    if i in a:
        continue
    count[i] = (count[i-1]+count[i-2])%(10**9+7)
print(count[-1])