INF = float("inf") #const

def main():
    n,m = map(int,input().split())
    a = [int(input()) for i in range(m)]
    dp = [0]*(n+1)
    dp[0],dp[1] = 1,1

    for i in range(2,n+1):
        if issafe(i-1,a):
            dp[i] += dp[i-1]
        if issafe(i-2,a):
            dp[i] += dp[i-2]

    print(dp[n]%(10**9+7))


def issafe(i,a):
    if i in a:
        return False
    else:
        return True


if __name__ == "__main__":
    main()
