n, m = map(int, input().split())
broken = [0] * n
dp = [0] * (n+1)
in_memo = [0] * (n+1)
for i in range(m):
    broken[int(input())] = 1

def solve(i):
    if(not in_memo[i]):
        if i == n:
            dp[i] = 1
        elif i == n-1:
            dp[i] = 0 if broken[i] else 1
        else:
            dp[i] = 0 if broken[i] else (solve(i+1)+solve(i+2)) % 1000000007
        in_memo[i] = 1
    return dp[i]

print(solve(0))