from sys import stdin

n,m = [int(x) for x in stdin.readline().rstrip().split()]

#フィボナッチ数列
def fib(n):
    a, b = 1, 1
    for _ in range(n):
        a, b = b, a + b
    return a

if m == 0:
    print(fib(n))
    exit()

lin = [int(stdin.readline().rstrip()) for _ in range(m)]

dp = [-1 for _ in range(n+1)]
dp[0] = 1

if lin[0] == 1:
    dp[1] = 0
else:
    dp[1] = 1
for i in range(2,n+1):
    if i in lin:
        dp[i] = 0
    else:
        dp[i] = dp[i-1] + dp[i-2]

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