from functools import lru_cache

n, m = map(int, input().split())
a = set(int(input()) for _ in range(m))

mod = 10**9+7

@lru_cache(maxsize=n)
def stairway(i) :
    if i in a :
        return 0
    elif i == 0 :
        return 1
    elif i == 1 :
        return stairway(0)
    else :
        return (stairway(i-1)+stairway(i-2))%mod
    
print(stairway(n))