NM = list(map(int,input().split()))

N = NM[0]

M = NM[1]



A =[]

while True:

    try:

        A.append(int(eval(input())))

    except:

        break;



countlist = [1,1,2]

if N >3:

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

        a = countlist[i-2]+countlist[i-1]

        if a>1000000007:

            a = a%1000000007

        countlist.append(a)



t = 0

count = 0

out = []



if N >1:

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

        count+=1

        if ((t<len(A))and(i==A[t])):

            t+= 1

            while ((t<len(A))and(i==A[t])):

                t+=1

            if count > 0:

                out.append(countlist[count-1])

            else:

                out.append(0)

                break

            count = -1





if count>=0:

    out.append(countlist[count])



output = 1



for i in range(len(out)):

    output = output*out[i]

    if output > 1000000007:

        output = output%1000000007



print(output)
N,M = list(map(int,input().split()))

p=10**9+7

A = [0]*(N+1)

flag = 0

for i in range(M):

    tmp = int(eval(input()))

    A[tmp]=1

    if A[tmp]*A[tmp-1]>0:

        flag=1

        break

if flag==1:

    print((0))

else:

    dp = [0]*(N+1)

    dp[0] = 1

    dp[1] = 1-A[1]

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

        if A[i]==1:

            continue

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

    print((dp[-1]))
NM = list(map(int, input().split()))
N = NM[0]
M = NM[1]
A = []
while True:
    try:
        A.append(int(eval(input())))
    except:
        break
countlist = [1, 1, 2]
if N > 3:
    for i in range(3, N + 1):
        a = countlist[i - 2] + countlist[i - 1]
        if a > 1000000007:
            a = a % 1000000007
        countlist.append(a)
t = 0
count = 0
out = []
if N > 1:
    for i in range(1, N + 1):
        count += 1
        if (t < len(A)) and (i == A[t]):
            t += 1
            while (t < len(A)) and (i == A[t]):
                t += 1
            if count > 0:
                out.append(countlist[count - 1])
            else:
                out.append(0)
                break
            count = -1
if count >= 0:
    out.append(countlist[count])
output = 1
for i in range(len(out)):
    output = output * out[i]
    if output > 1000000007:
        output = output % 1000000007
print(output)

N, M = list(map(int, input().split()))
p = 10**9 + 7
A = [0] * (N + 1)
flag = 0
for i in range(M):
    tmp = int(eval(input()))
    A[tmp] = 1
    if A[tmp] * A[tmp - 1] > 0:
        flag = 1
        break
if flag == 1:
    print((0))
else:
    dp = [0] * (N + 1)
    dp[0] = 1
    dp[1] = 1 - A[1]
    for i in range(2, N + 1):
        if A[i] == 1:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % p
    print((dp[-1]))

-NM = list(map(int, input().split())) -N = NM[0] -M = NM[1] -A = [] -while True: -    try: -        A.append(int(eval(input()))) -    except: +N, M = list(map(int, input().split())) +p = 10**9 + 7 +A = [0] * (N + 1) +flag = 0 +for i in range(M): +    tmp = int(eval(input())) +    A[tmp] = 1 +    if A[tmp] * A[tmp - 1] > 0: +        flag = 1 -countlist = [1, 1, 2] -if N > 3: -    for i in range(3, N + 1): -        a = countlist[i - 2] + countlist[i - 1] -        if a > 1000000007: -            a = a % 1000000007 -        countlist.append(a) -t = 0 -count = 0 -out = [] -if N > 1: -    for i in range(1, N + 1): -        count += 1 -        if (t < len(A)) and (i == A[t]): -            t += 1 -            while (t < len(A)) and (i == A[t]): -                t += 1 -            if count > 0: -                out.append(countlist[count - 1]) -            else: -                out.append(0) -                break -            count = -1 -if count >= 0: -    out.append(countlist[count]) -output = 1 -for i in range(len(out)): -    output = output * out[i] -    if output > 1000000007: -        output = output % 1000000007 -print(output) +if flag == 1: +    print((0)) +else: +    dp = [0] * (N + 1) +    dp[0] = 1 +    dp[1] = 1 - A[1] +    for i in range(2, N + 1): +        if A[i] == 1: +            continue +        dp[i] = (dp[i - 1] + dp[i - 2]) % p +    print((dp[-1]))