n, m = map(int,input().split())
a = []
import sys
sys.setrecursionlimit(10000)
for i in range(m):
    a.append(int(input()))
memo = [0 for i in range(n)]
done = [0 for i in range(n)]
def p(i):
    if done[i-1] == 1:
        return memo[i-1]
    if i in a:
        return 0
    elif i == 1:
        return 1
    elif i == 2:
        return p(1) + 1
    else:
        done[i-1] = 1
        memo[i-1] = p(i-1) + p(i-2)
        return memo[i-1]
print(p(n) % (10**9 + 7))