import sys

N,M = list(map(int, input().split()))
a = [int(input()) - 1 for i in range(M)]
memo = [-1 for i in range(N)]

def process(n): #n段目まで何通りでいけるか？
    if memo[n] != -1:
        return memo[n]
    if n == -1: # nが-1
        return 1
    if n in a:
        memo[n] = 0
        return 0
    if n == 0:
        memo[0] = 1
        return 1
    cnt = process(n-1) + process(n-2)
    memo[n] = cnt
    return cnt

print(process(N-1) % 1000000007)