from collections import deque
n, m = map(int, input().split())
a = set(int(input()) for _ in range(m))
M = 1000000007
dp = {}
dp[0] = 1
dp[1] = 1
for i in range(2, n+1):
    if i in a:
        dp[2] = 0
    else:
        dp[2] = dp[0] + dp[1]
    dp[0] = dp[1]
    dp[1] = dp[2]

print(dp[2] % M)