import sys


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


# dp[i] := i段目にたどり着く移動方法の総数
# 一歩で1段か2段上れるのだから、dp[i]は前段と前々段へたどり着く方法の和
# dp[i] = dp[i-1] + dp[i-2]
# dp配列は-1段目と-2段目の分大きくなっています
dp = [0 for _ in range(N+3)]
# 一段目初期化
dp[2] = 1

for i in range(2, N+3):
    if not has_broken[i]:
        dp[i] += dp[i-1] + dp[i-2]

print(dp[N+2]%1000000007)