def makelist(n, m):

    return [[0 for _ in range(m)] for _ in range(n)]



MOD = int(1e9) + 7



N, M = list(map(int, input().split()))

a = [True]*(N+1)



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

    n = int(eval(input()))

    a[n] = False



##

dp = [0]*(N+1)

dp[0] = 1

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

    if a[i]:

        if i == 1:

            dp[i] = dp[i-1]

        else:

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

print((dp[-1]))

MOD = int(1e9) + 7



N, M = list(map(int, input().split()))

a = [True]*(N+1)



for _ in range(1, M+1):

    n = int(eval(input()))

    a[n] = False



##

dp = [0]*(N+1)

dp[0] = 1

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

    if a[i]:

        if i == 1:

            dp[i] = dp[i-1]

        else:

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

print((dp[-1]))

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]


MOD = int(1e9) + 7
N, M = list(map(int, input().split()))
a = [True] * (N + 1)
for i in range(1, M + 1):
    n = int(eval(input()))
    a[n] = False
##
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
    if a[i]:
        if i == 1:
            dp[i] = dp[i - 1]
        else:
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
print((dp[-1]))

MOD = int(1e9) + 7
N, M = list(map(int, input().split()))
a = [True] * (N + 1)
for _ in range(1, M + 1):
    n = int(eval(input()))
    a[n] = False
##
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
    if a[i]:
        if i == 1:
            dp[i] = dp[i - 1]
        else:
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
print((dp[-1]))

-def makelist(n, m): -    return [[0 for _ in range(m)] for _ in range(n)] - - -for i in range(1, M + 1): +for _ in range(1, M + 1):