import pysnooper

@pysnooper.snoop()
def rec(n,me,stair):
    if me[n-1]!=0:
        return me[n-1]
    elif n in stair:
        return 0
    elif n==1:
        if n-1 in stair:
            me[n-1]=0
            return 0
        me[n-1]=1
        return 1
    elif n==2:
        test1=n-1 in stair
        test2=n-2 in stair
        if test1 and test2:
            me[n-1]=0
            return 0
        elif test1 or test2:
            me[n-1]=1
            return 1
        me[n-2]=2
        return 2
    else:
        ans=rec(n-2,me,stair)+rec(n-1,me,stair)
        me[n-1]=ans
        return ans

n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
memo=[0]*(n+1)
print(rec(n,memo,a)%1000000007)
