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

stair = []

mod = int(1e9+7)

ans = 1

for i in range(m):

    stair.append(int(eval(input())))

dp = [0] * (n+1)

dp[0] = dp[1] = 1

stair.append(int(1e10))

if n == 1:

    print((1))

    exit()

k = 0

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

    if i == stair[k]:

        dp[i] = 0

        k += 1

    elif i == 1:

        dp[1] = 1

    else:

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

print((dp[-1]))







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

stair = []

mod = int(1e9+7)

for i in range(m):

    stair.append(int(eval(input())))

dp = [0] * (n+1)

dp[0] = 1

stair.append(int(1e10))

k = 0

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

    if i == stair[k]:

        dp[i] = 0

        k += 1

    elif i == 1:

        dp[1] = 1

    else:

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

print((dp[-1]))







n, m = list(map(int, input().split()))
stair = []
mod = int(1e9 + 7)
ans = 1
for i in range(m):
    stair.append(int(eval(input())))
dp = [0] * (n + 1)
dp[0] = dp[1] = 1
stair.append(int(1e10))
if n == 1:
    print((1))
    exit()
k = 0
for i in range(1, n + 1):
    if i == stair[k]:
        dp[i] = 0
        k += 1
    elif i == 1:
        dp[1] = 1
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
print((dp[-1]))

n, m = list(map(int, input().split()))
stair = []
mod = int(1e9 + 7)
for i in range(m):
    stair.append(int(eval(input())))
dp = [0] * (n + 1)
dp[0] = 1
stair.append(int(1e10))
k = 0
for i in range(1, n + 1):
    if i == stair[k]:
        dp[i] = 0
        k += 1
    elif i == 1:
        dp[1] = 1
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
print((dp[-1]))

-ans = 1 -dp[0] = dp[1] = 1 +dp[0] = 1 -if n == 1: -    print((1)) -    exit()