import sys

sys.setrecursionlimit(10**7)

def lmi(): return list(map(int, input().split()))



n, m = lmi()



l = [0] * (n+1)

l[0] = 1



a = 0

if m != 0:

    a = int(eval(input()))

k = 1

for i in range(n+1):



    if i != a:

        if i == 1:

            l[i] = 1

        elif i >= 2:

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

            l[i] %= 1000000007

    else:

        k += 1

        if k <= m:

            a = int(eval(input()))







#print(l)

print((l[n] % 1000000007))

import sys

sys.setrecursionlimit(10**7)

def lmi(): return list(map(int, input().split()))



n, m = lmi()

a = [1] * (n+1)

for i in range(m):

    a[int(eval(input()))] = 0

k = [0] * (n+1)

k[0] = 1

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

    if i == 1 and a[1]:

        k[1] = 1

    elif i >= 2 and a[i]:

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

        k[i] %= 10 ** 9 + 7



print((k[n]))

import sys

sys.setrecursionlimit(10**7)


def lmi():
    return list(map(int, input().split()))


n, m = lmi()
l = [0] * (n + 1)
l[0] = 1
a = 0
if m != 0:
    a = int(eval(input()))
k = 1
for i in range(n + 1):
    if i != a:
        if i == 1:
            l[i] = 1
        elif i >= 2:
            l[i] = l[i - 1] + l[i - 2]
            l[i] %= 1000000007
    else:
        k += 1
        if k <= m:
            a = int(eval(input()))
# print(l)
print((l[n] % 1000000007))

import sys

sys.setrecursionlimit(10**7)


def lmi():
    return list(map(int, input().split()))


n, m = lmi()
a = [1] * (n + 1)
for i in range(m):
    a[int(eval(input()))] = 0
k = [0] * (n + 1)
k[0] = 1
for i in range(1, n + 1):
    if i == 1 and a[1]:
        k[1] = 1
    elif i >= 2 and a[i]:
        k[i] = k[i - 1] + k[i - 2]
        k[i] %= 10**9 + 7
print((k[n]))

-l = [0] * (n + 1) -l[0] = 1 -a = 0 -if m != 0: -    a = int(eval(input())) -k = 1 -for i in range(n + 1): -    if i != a: -        if i == 1: -            l[i] = 1 -        elif i >= 2: -            l[i] = l[i - 1] + l[i - 2] -            l[i] %= 1000000007 -    else: -        k += 1 -        if k <= m: -            a = int(eval(input())) -# print(l) -print((l[n] % 1000000007)) +a = [1] * (n + 1) +for i in range(m): +    a[int(eval(input()))] = 0 +k = [0] * (n + 1) +k[0] = 1 +for i in range(1, n + 1): +    if i == 1 and a[1]: +        k[1] = 1 +    elif i >= 2 and a[i]: +        k[i] = k[i - 1] + k[i - 2] +        k[i] %= 10**9 + 7 +print((k[n]))