#!/usr/bin/env python

from collections import deque
import itertools as ite
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

N, M = map(int, raw_input().split())
flag = [False] * (N + 1)
for i in range(M):
    num = input()
    flag[num] = True

DP = [0, 1] + [0] * N
for i in range(1, N + 1):
    if not flag[i]:
        DP[i + 1] = DP[i] + DP[i - 1]
        DP[i + 1] %= MOD
print DP[N + 1]
