import sys



sys.setrecursionlimit(2147483647)

INF = float("inf")

MOD = 1000000007



a=open(0)

N,_,*a = list(map(int, a.read().split()))



dp = [-1 for _ in range(100010)]

dp[0] = 0

for i in a: dp[i] = 0

def rec(i):

    if dp[i] > -1:

        return dp[i]

    if i<3:

        dp[i] = rec(i-1) + 1

        return dp[i]

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

    return dp[i]

    

print((rec(N)))









MOD=10**9+7



N,_,*a = list(map(int, open(0).read().split()))

A=set(a)

dp = [0 for _ in range(N+1)]

dp[:2] = 1, 0 if 1 in A else 1

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

    if i not in A:

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

    

print((dp[N]))





import sys

sys.setrecursionlimit(2147483647)
INF = float("inf")
MOD = 1000000007
a = open(0)
N, _, *a = list(map(int, a.read().split()))
dp = [-1 for _ in range(100010)]
dp[0] = 0
for i in a:
    dp[i] = 0


def rec(i):
    if dp[i] > -1:
        return dp[i]
    if i < 3:
        dp[i] = rec(i - 1) + 1
        return dp[i]
    dp[i] = (rec(i - 1) + rec(i - 2)) % MOD
    return dp[i]


print((rec(N)))

MOD = 10**9 + 7
N, _, *a = list(map(int, open(0).read().split()))
A = set(a)
dp = [0 for _ in range(N + 1)]
dp[:2] = 1, 0 if 1 in A else 1
for i in range(2, N + 1):
    if i not in A:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
print((dp[N]))

-import sys - -sys.setrecursionlimit(2147483647) -INF = float("inf") -MOD = 1000000007 -a = open(0) -N, _, *a = list(map(int, a.read().split())) -dp = [-1 for _ in range(100010)] -dp[0] = 0 -for i in a: -    dp[i] = 0 - - -def rec(i): -    if dp[i] > -1: -        return dp[i] -    if i < 3: -        dp[i] = rec(i - 1) + 1 -        return dp[i] -    dp[i] = (rec(i - 1) + rec(i - 2)) % MOD -    return dp[i] - - -print((rec(N))) +MOD = 10**9 + 7 +N, _, *a = list(map(int, open(0).read().split())) +A = set(a) +dp = [0 for _ in range(N + 1)] +dp[:2] = 1, 0 if 1 in A else 1 +for i in range(2, N + 1): +    if i not in A: +        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD +print((dp[N]))