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

a = set(map(int, [eval(input()) for _ in range(m)]))



dp = [0] * (n+1)

# 0段目と1段目は1通り（但し、１段目が壊れていない場合）（0 段目は「なにもしない」という から1 通り）

dp[:2] = 1, 1 if 1 not in a else 0 



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

    if i in a:

        continue

    else:

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



print((dp[-1] % (10**9+7)))

import sys

input = sys.stdin.readline



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

broken_steps = set([int(eval(input())) for _ in range(m)])

#print(broken_steps)



def ptn_num(x): # 'x'stepまでのパターン数

    if x == 1:

        print((1))

    else:

        dp = [0] * (x+1) # DP枠_including step'0'

        cnt = 0

        if 1 in broken_steps: # in case, step'1' broken 

            dp[:2] = 1, 0

        else:

            dp[:2] = 1, 1 # Usually



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

            if i in broken_steps: # 階段が壊れている場合...

                cnt += 1

                if cnt == 2:

                    print((0))

                    exit()

            else: # 階段が壊れてない場合...

                dp[i] = (dp[i-1] + dp[i-2]) % (10**9+7)

                cnt = 0

        

        print((dp[-1]))



ptn_num(n)

n, m = list(map(int, input().split()))
a = set(map(int, [eval(input()) for _ in range(m)]))
dp = [0] * (n + 1)
# 0段目と1段目は1通り（但し、１段目が壊れていない場合）（0 段目は「なにもしない」という から1 通り）
dp[:2] = 1, 1 if 1 not in a else 0
for i in range(2, n + 1):
    if i in a:
        continue
    else:
        dp[i] = dp[i - 1] + dp[i - 2]
print((dp[-1] % (10**9 + 7)))

import sys

input = sys.stdin.readline
n, m = list(map(int, input().split()))
broken_steps = set([int(eval(input())) for _ in range(m)])
# print(broken_steps)
def ptn_num(x):  # 'x'stepまでのパターン数
    if x == 1:
        print((1))
    else:
        dp = [0] * (x + 1)  # DP枠_including step'0'
        cnt = 0
        if 1 in broken_steps:  # in case, step'1' broken
            dp[:2] = 1, 0
        else:
            dp[:2] = 1, 1  # Usually
        for i in range(2, x + 1):
            if i in broken_steps:  # 階段が壊れている場合...
                cnt += 1
                if cnt == 2:
                    print((0))
                    exit()
            else:  # 階段が壊れてない場合...
                dp[i] = (dp[i - 1] + dp[i - 2]) % (10**9 + 7)
                cnt = 0
        print((dp[-1]))


ptn_num(n)

+import sys + +input = sys.stdin.readline -a = set(map(int, [eval(input()) for _ in range(m)])) -dp = [0] * (n + 1) -# 0段目と1段目は1通り（但し、１段目が壊れていない場合）（0 段目は「なにもしない」という から1 通り） -dp[:2] = 1, 1 if 1 not in a else 0 -for i in range(2, n + 1): -    if i in a: -        continue +broken_steps = set([int(eval(input())) for _ in range(m)]) +# print(broken_steps) +def ptn_num(x):  # 'x'stepまでのパターン数 +    if x == 1: +        print((1)) -        dp[i] = dp[i - 1] + dp[i - 2] -print((dp[-1] % (10**9 + 7))) +        dp = [0] * (x + 1)  # DP枠_including step'0' +        cnt = 0 +        if 1 in broken_steps:  # in case, step'1' broken +            dp[:2] = 1, 0 +        else: +            dp[:2] = 1, 1  # Usually +        for i in range(2, x + 1): +            if i in broken_steps:  # 階段が壊れている場合... +                cnt += 1 +                if cnt == 2: +                    print((0)) +                    exit() +            else:  # 階段が壊れてない場合... +                dp[i] = (dp[i - 1] + dp[i - 2]) % (10**9 + 7) +                cnt = 0 +        print((dp[-1])) + + +ptn_num(n)