def resolve():
    import sys
    
    read = sys.stdin.read
    readline = sys.stdin.readline

    N, M = map(int, readline().split())
    a = [int(x) for x in read().split()]
    
    dp = [0] * (N + 2)
    dp[0] = 1
    
    for i in range(N):
        one = i + 1
        two = i + 2
        now = dp[i]
        if one not in a:
            dp[one] += now
        if two not in a:
            dp[two] += now
    print(dp[N] % 1_000_000_007)


resolve()
