import sys



n, m = list(map(int, input().split()))

aaa = set(map(int, sys.stdin))

dp = [0] * (n + 1)

dp[0] = 1

dp[1] = 1 if 1 not in aaa else 0

MOD = 10 ** 9 + 7



for i in range(2, n + 1):

    if i in aaa:

        continue

    dp[i] = (dp[i - 2] + dp[i - 1]) % MOD

print((dp[n]))

import sys



n, m = list(map(int, input().split()))

if m > 0:

    aaa = set(map(int, sys.stdin))

else:

    aaa = set()

dp = [0] * (n + 1)

dp[0] = 1

dp[1] = 1 if 1 not in aaa else 0

MOD = 10 ** 9 + 7



for i in range(2, n + 1):

    if i in aaa:

        continue

    dp[i] = (dp[i - 2] + dp[i - 1]) % MOD

print((dp[n]))

import sys

n, m = list(map(int, input().split()))
aaa = set(map(int, sys.stdin))
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1 if 1 not in aaa else 0
MOD = 10**9 + 7
for i in range(2, n + 1):
    if i in aaa:
        continue
    dp[i] = (dp[i - 2] + dp[i - 1]) % MOD
print((dp[n]))

import sys

n, m = list(map(int, input().split()))
if m > 0:
    aaa = set(map(int, sys.stdin))
else:
    aaa = set()
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1 if 1 not in aaa else 0
MOD = 10**9 + 7
for i in range(2, n + 1):
    if i in aaa:
        continue
    dp[i] = (dp[i - 2] + dp[i - 1]) % MOD
print((dp[n]))

-aaa = set(map(int, sys.stdin)) +if m > 0: +    aaa = set(map(int, sys.stdin)) +else: +    aaa = set()