from functools import lru_cache
n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
@lru_cache(maxsize=None)
def f(x):
    if x<2:return x
    elif x-1 in a:return 0
    else:return (f(x-1)+f(x-2))%1000000007
print(f(n+1))