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

k = []

count_sub = 0

steps = []

j = 0

for i in range(m):

    k.append(int(eval(input()))) 

    if len(k)>1 and k[i]-k[i-1]==1:

        count_sub = 1

        

if count_sub ==1:

    steps = [0 for i in range(n)]  

else:

    for i in range(n+1):

        if k!=[] and k[j]==i:

            steps.append(0)

            if j < len(k)-1:

                j = j + 1

        elif i ==0:

            steps.append(1)

        elif i ==1:

            steps.append(1)  

        else:

            steps.append(steps[i-1]+steps[i-2])

 

print((steps[-1]%(1000000007)))
n, m = list(map(int, input().split()))

k = []

count_sub = 0

steps = []

j = 0

for i in range(m):

    k.append(int(eval(input()))) 

    if len(k)>1 and k[i]-k[i-1]==1:

        count_sub = 1

        

if count_sub ==1:

    steps = [0 for i in range(n)]  

else:

    for i in range(n+1):

        if k!=[] and k[j]==i:

            steps.append(0)

            if j < len(k)-1:

                j = j + 1

        elif i ==0:

            steps.append(1)

        elif i ==1:

            steps.append(1)  

        else:

            steps.append((steps[i-1]+steps[i-2])%1000000007)

 

print((steps[-1]))
n, m = list(map(int, input().split()))
k = []
count_sub = 0
steps = []
j = 0
for i in range(m):
    k.append(int(eval(input())))
    if len(k) > 1 and k[i] - k[i - 1] == 1:
        count_sub = 1
if count_sub == 1:
    steps = [0 for i in range(n)]
else:
    for i in range(n + 1):
        if k != [] and k[j] == i:
            steps.append(0)
            if j < len(k) - 1:
                j = j + 1
        elif i == 0:
            steps.append(1)
        elif i == 1:
            steps.append(1)
        else:
            steps.append(steps[i - 1] + steps[i - 2])
print((steps[-1] % (1000000007)))

n, m = list(map(int, input().split()))
k = []
count_sub = 0
steps = []
j = 0
for i in range(m):
    k.append(int(eval(input())))
    if len(k) > 1 and k[i] - k[i - 1] == 1:
        count_sub = 1
if count_sub == 1:
    steps = [0 for i in range(n)]
else:
    for i in range(n + 1):
        if k != [] and k[j] == i:
            steps.append(0)
            if j < len(k) - 1:
                j = j + 1
        elif i == 0:
            steps.append(1)
        elif i == 1:
            steps.append(1)
        else:
            steps.append((steps[i - 1] + steps[i - 2]) % 1000000007)
print((steps[-1]))

-            steps.append(steps[i - 1] + steps[i - 2]) -print((steps[-1] % (1000000007))) +            steps.append((steps[i - 1] + steps[i - 2]) % 1000000007) +print((steps[-1]))