import sys

import collections

ns = lambda: sys.stdin.readline().rstrip()

ni = lambda: int(ns())

nm = lambda: list(map(int, sys.stdin.readline().split()))

nl = lambda: list(nm())

nsm = lambda: list(map(str, sys.stdin.readline().split()))

nsl = lambda: list(nsm())



mod = 1000000007



n, m = nm()

dp = [0] * (n + 1)

for i in range(m):

    tmp = ni()

    dp[tmp] = -1

dp[0] = 1

for i in range(n):

    if i + 1 < n + 1:

        if dp[i + 1] != -1 and dp[i] != -1:

            dp[i + 1] += dp[i] % mod

            dp[i + 1] %= mod

    if i + 2 < n + 1:

        if dp[i + 2] != -1 and dp[i] != -1:

            dp[i + 2] += dp[i] % mod

            dp[i + 2] %= mod

print((dp[n] % mod))

import sys

import collections

ns = lambda: sys.stdin.readline().rstrip()

ni = lambda: int(ns())

nm = lambda: list(map(int, sys.stdin.readline().split()))

nl = lambda: list(nm())

nsm = lambda: list(map(str, sys.stdin.readline().split()))

nsl = lambda: list(nsm())



mod = 1000000007



n, m = nm()

dp = [0] * (n + 2)

for i in range(m):

    tmp = ni()

    dp[tmp] = -1

dp[0] = 1

for i in range(n):

    if i + 1 <= n:

        if dp[i + 1] != -1 and dp[i] != -1:

            dp[i + 1] += dp[i] % mod

            dp[i + 1] %= mod

    if i + 2 <= n:

        if dp[i + 2] != -1 and dp[i] != -1:

            dp[i + 2] += dp[i] % mod

            dp[i + 2] %= mod

print((dp[n] % mod))

import sys
import collections

ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: list(map(int, sys.stdin.readline().split()))
nl = lambda: list(nm())
nsm = lambda: list(map(str, sys.stdin.readline().split()))
nsl = lambda: list(nsm())
mod = 1000000007
n, m = nm()
dp = [0] * (n + 1)
for i in range(m):
    tmp = ni()
    dp[tmp] = -1
dp[0] = 1
for i in range(n):
    if i + 1 < n + 1:
        if dp[i + 1] != -1 and dp[i] != -1:
            dp[i + 1] += dp[i] % mod
            dp[i + 1] %= mod
    if i + 2 < n + 1:
        if dp[i + 2] != -1 and dp[i] != -1:
            dp[i + 2] += dp[i] % mod
            dp[i + 2] %= mod
print((dp[n] % mod))

import sys
import collections

ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: list(map(int, sys.stdin.readline().split()))
nl = lambda: list(nm())
nsm = lambda: list(map(str, sys.stdin.readline().split()))
nsl = lambda: list(nsm())
mod = 1000000007
n, m = nm()
dp = [0] * (n + 2)
for i in range(m):
    tmp = ni()
    dp[tmp] = -1
dp[0] = 1
for i in range(n):
    if i + 1 <= n:
        if dp[i + 1] != -1 and dp[i] != -1:
            dp[i + 1] += dp[i] % mod
            dp[i + 1] %= mod
    if i + 2 <= n:
        if dp[i + 2] != -1 and dp[i] != -1:
            dp[i + 2] += dp[i] % mod
            dp[i + 2] %= mod
print((dp[n] % mod))

-dp = [0] * (n + 1) +dp = [0] * (n + 2) -    if i + 1 < n + 1: +    if i + 1 <= n: -    if i + 2 < n + 1: +    if i + 2 <= n: