def solve(n,m,a):
    dp = [0]*n
    if n==1:
        if 0 in a:
            print(0)
            exit()
        else:
            print(1)
            exit()
    if 0 in a:
        if 1 in a:
            print(0)
            exit()
        else:
            dp[0]=0
            dp[1]=1
    else:
        if 1 in a:
            dp[0]=1
            dp[1]=0
        else:
            dp[0]=1
            dp[1]=2
    for i in range(2,n):
        if i in a:
            continue
        if i-1 in a and i-2 in a:
            print(0)
            exit()
        elif i-1 in a:
            dp[i]=dp[i-2]
        elif i-2 in a:
            dp[i]=dp[i-1]
        else:
            dp[i]= dp[i-1]+dp[i-2]
            if dp[i]>10**9+7:
                dp[i]-=(10**9+7)
    return dp[-1]
def main():
    n,m = map(int,input().split())
    a = [int(input())-1 for i in range(m)]
    print(solve(n,m,a))
if __name__ == "__main__":
    main()
