N,M = map(int, input().split())
arr = [int(input()) for _ in range(0,M)]
dp = [0 for _ in range(0,N+1)]
dp[0] = 1 if 0 not in arr else 0
dp[1] = 1 if 1 not in arr else 0
for i in range(2,N+1):
    if dp[i-1] == 0 and dp[i-2] == 0:
        break
    if (i-1) not in arr: dp[i] += dp[i-1]
    if (i-2) not in arr: dp[i] += dp[i-2]
print(dp[N] % (10**9 + 7))