# -*- coding: utf-8 -*-
n,m = list(map(int,input().split()))
a = [int(input()) for i in range(m)]

inf=float("inf")
i_pattern = [-inf for i in range(n+1)]

#i段目までの行き方を数える
def solve(i):
    if i == 1:
        if 1 in a:
            i_pattern[1] = 0
            return 0
        else:
            i_pattern[1] = 1
            return 1
    if i == 0:
        i_pattern[0]=1
        return 1
    if i_pattern[i] >= 0:
        ret = i_pattern[i]
    else :
        if i in a:
            i_pattern[i]=0
            return 0
        ret = solve(i-1)+solve(i-2)
        i_pattern[i]=ret
    return ret

print(solve(n)%1000000007)
