n,m,*a=list(map(int,open(0).read().split()))

dp=[-1]*(n+1)

for i in a:

    dp[i]=0

dp[0]=1 

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

    if dp[i]!=0:

        dp[i]=dp[i-1]+dp[i-2]*(i>1)

print((dp[-1]%(10**9+7)))
n,m,*a=list(map(int,open(0).read().split()))

d=[1]*(n+1)

for i in a:

    d[i]=0

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

    if d[i]!=0:

        d[i]=d[i-1]+d[i-2]

print((d[-1]%(10**9+7)))
n, m, *a = list(map(int, open(0).read().split()))
dp = [-1] * (n + 1)
for i in a:
    dp[i] = 0
dp[0] = 1
for i in range(1, n + 1):
    if dp[i] != 0:
        dp[i] = dp[i - 1] + dp[i - 2] * (i > 1)
print((dp[-1] % (10**9 + 7)))

n, m, *a = list(map(int, open(0).read().split()))
d = [1] * (n + 1)
for i in a:
    d[i] = 0
for i in range(2, n + 1):
    if d[i] != 0:
        d[i] = d[i - 1] + d[i - 2]
print((d[-1] % (10**9 + 7)))

-dp = [-1] * (n + 1) +d = [1] * (n + 1) -    dp[i] = 0 -dp[0] = 1 -for i in range(1, n + 1): -    if dp[i] != 0: -        dp[i] = dp[i - 1] + dp[i - 2] * (i > 1) -print((dp[-1] % (10**9 + 7))) +    d[i] = 0 +for i in range(2, n + 1): +    if d[i] != 0: +        d[i] = d[i - 1] + d[i - 2] +print((d[-1] % (10**9 + 7)))