import sys

input = sys.stdin.readline



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



a_set = {int(eval(input())) for _ in range(m)}



ans_list = []



ans_list = [0] * (n + 1)



for index in range(n + 1):

    if index == 0:

        ans_list[index] += 1

        continue

    if index == 1 and (index not in a_set):

        ans_list[index] += ans_list[index - 1]

        continue



    if index not in a_set:

        if (index - 1) not in a_set:

            ans_list[index] += ans_list[index - 1]

            ans_list[index] %= 1000000007

        if (index - 2) not in a_set:

            ans_list[index] += ans_list[index - 2]

            ans_list[index] %= 1000000007



print((ans_list[n]))

import sys



input = sys.stdin.readline



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



a = {int(eval(input())) for _ in range(m)}



count = 0



stair = [0] * (n + 1)



for index, value in enumerate(stair):

    if index == 0:

        stair[index] = 1

        continue

    if index == 1:

        if index - 1 not in a:

            stair[index] += stair[index-1]

        continue



    if index - 1 not in a:

        stair[index] += stair[index - 1]

        stair[index] %= 1000000007

    if index - 2 not in a:

        stair[index] += stair[index - 2]

        stair[index] %= 1000000007



print((stair[len(stair) - 1]))

import sys

input = sys.stdin.readline
n, m = list(map(int, input().split()))
a_set = {int(eval(input())) for _ in range(m)}
ans_list = []
ans_list = [0] * (n + 1)
for index in range(n + 1):
    if index == 0:
        ans_list[index] += 1
        continue
    if index == 1 and (index not in a_set):
        ans_list[index] += ans_list[index - 1]
        continue
    if index not in a_set:
        if (index - 1) not in a_set:
            ans_list[index] += ans_list[index - 1]
            ans_list[index] %= 1000000007
        if (index - 2) not in a_set:
            ans_list[index] += ans_list[index - 2]
            ans_list[index] %= 1000000007
print((ans_list[n]))

import sys

input = sys.stdin.readline
n, m = list(map(int, input().split()))
a = {int(eval(input())) for _ in range(m)}
count = 0
stair = [0] * (n + 1)
for index, value in enumerate(stair):
    if index == 0:
        stair[index] = 1
        continue
    if index == 1:
        if index - 1 not in a:
            stair[index] += stair[index - 1]
        continue
    if index - 1 not in a:
        stair[index] += stair[index - 1]
        stair[index] %= 1000000007
    if index - 2 not in a:
        stair[index] += stair[index - 2]
        stair[index] %= 1000000007
print((stair[len(stair) - 1]))

-a_set = {int(eval(input())) for _ in range(m)} -ans_list = [] -ans_list = [0] * (n + 1) -for index in range(n + 1): +a = {int(eval(input())) for _ in range(m)} +count = 0 +stair = [0] * (n + 1) +for index, value in enumerate(stair): -        ans_list[index] += 1 +        stair[index] = 1 -    if index == 1 and (index not in a_set): -        ans_list[index] += ans_list[index - 1] +    if index == 1: +        if index - 1 not in a: +            stair[index] += stair[index - 1] -    if index not in a_set: -        if (index - 1) not in a_set: -            ans_list[index] += ans_list[index - 1] -            ans_list[index] %= 1000000007 -        if (index - 2) not in a_set: -            ans_list[index] += ans_list[index - 2] -            ans_list[index] %= 1000000007 -print((ans_list[n])) +    if index - 1 not in a: +        stair[index] += stair[index - 1] +        stair[index] %= 1000000007 +    if index - 2 not in a: +        stair[index] += stair[index - 2] +        stair[index] %= 1000000007 +print((stair[len(stair) - 1]))