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

memo = [-1 for _ in range(n)]

DIV_NUM = 1000000007
if 1 in a_list:
    memo[0] = 0
else:
    memo[0] = 1
for i in range(1, n):
    if i == 1:
        if i+1 in a_list:
            memo[i] = 0
        else:
            memo[i] = (memo[0] + 1) % DIV_NUM
    else:
        if i+1 in a_list:
            memo[i] = 0
        else:
            memo[i] = (memo[i-1] + memo[i-2]) % DIV_NUM

print(memo[-1])