import sys


input = sys.stdin.readline

N, M = map(int, input().split())
has_broken = [False]*(N+3)
prev_a = int(input())
has_broken[prev_a+2] = True
for _ in range(M-1):
    a = int(input())
    has_broken[a+2] = True

dp = [0]*(N+3)
dp[2] = 1
MOD = 10**9+7
for i in range(2, N+3):
    if not has_broken[i]:
        dp[i] += (dp[i-1] + dp[i-2])%MOD

print(dp[N+2])