val = list(map(int, input().strip().split()))
n = val[0]
m = val[1]
a = []

for i in range(m):
    a.append(int(input().strip()))

pastpast_result = 0
past_result = 1
result = 0

for i in range(n):
    result = 0
    if i not in a:
        result += past_result
    if i-1 not in a:
        result += pastpast_result

    if result > 1000000007:
        result = result % 1000000007
    
    pastpast_result = past_result
    past_result = result

print(result % 1000000007)