#create date: 2020-07-25 09:13

import sys
stdin = sys.stdin
mod = 10**9+7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n, m = na()
    a = list()
    for i in range(m):
        a.append(ni())

    dp = [0] * (10**5+1)
    dp[0] = 1
    if not 1 in a: dp[1] = 1
    for i in range(2, n+1):
        if i in a:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % mod
    print(dp[n])

if __name__ == "__main__":
    main()