# C - Typical Stairs

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

A = [int(eval(input())) for _ in range(M)]

A = set(A)



# dp[i]: i 段目まで来た時の移動方法の総数

dp = [0]*(N+1)



# 初期条件

dp[0] = 1



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

    if v in A:

        continue

    dp[v] = (dp[v] + dp[v-1])%(1000000007)

    if v > 1:

        dp[v] = (dp[v] + dp[v-2])%(1000000007)

print((dp[N]))
#96 C - Typical Stairs

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

A = [int(eval(input())) for _ in range(M)]

A = set(A)

MOD = 1000000007



dp = [0]*(N+1)

dp[0] = 1

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

    if i in A:

        continue

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

print((dp[N]))
# C - Typical Stairs
N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]
A = set(A)
# dp[i]: i 段目まで来た時の移動方法の総数
dp = [0] * (N + 1)
# 初期条件
dp[0] = 1
for v in range(1, N + 1):
    if v in A:
        continue
    dp[v] = (dp[v] + dp[v - 1]) % (1000000007)
    if v > 1:
        dp[v] = (dp[v] + dp[v - 2]) % (1000000007)
print((dp[N]))

# 96 C - Typical Stairs
N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]
A = set(A)
MOD = 1000000007
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
    if i in A:
        continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
print((dp[N]))

-# C - Typical Stairs +# 96 C - Typical Stairs -# dp[i]: i 段目まで来た時の移動方法の総数 +MOD = 1000000007 -# 初期条件 -for v in range(1, N + 1): -    if v in A: +for i in range(1, N + 1): +    if i in A: -    dp[v] = (dp[v] + dp[v - 1]) % (1000000007) -    if v > 1: -        dp[v] = (dp[v] + dp[v - 2]) % (1000000007) +    dp[i] = (dp[i - 1] + dp[i - 2]) % MOD