def resolve():
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]
    dp = [-1] * (n + 1)

    for i in a:
        dp[i] = 0

    print(i_step(n, a, dp) % 1000000007)

# i段目にたどり着くまでの移動方法の総数
def i_step(i, a, dp):
    if i < 0:
        return 0

    if i == 0:
        return 1

    ret = 0
    if dp[i - 1] != -1:
        ret += dp[i - 1]
    else:
        ret += i_step(i - 1, a, dp)

    if i == 1:
        return ret

    if dp[i - 2] != -1:
        ret += dp[i - 2]
    else:
        ret += i_step(i - 2, a, dp)

    dp[i] = ret
    return ret
  
resolve()