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

stair = [0,1] + [0 for i in range(n)]

ba = 2

for i in range(m):

	a = int(eval(input())) + 1

	for j in range(ba,a):

		stair[j] = stair[j - 1] + stair[j - 2]

	ba = a + 1

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

	stair[i] = stair[i - 1] + stair[i - 2]

print((stair[n + 1] % 1000000007))
N, M = list(map(int,input().split()))

a = set()

for _ in range(M):

    A = int(eval(input()))

    a.add(A)

dp = [0 for _ in range(N + 2)]

dp[0] = 1

for i in range(N):

    if i in a:

        continue

    dp[i + 1] += dp[i]

    dp[i + 2] += dp[i]

    if dp[i + 1] > 1000000007:

        dp[i + 1] %= 1000000007

        dp[i + 2] %= 1000000007

print((dp[N] % 1000000007))
n, m = list(map(int, input().split()))
stair = [0, 1] + [0 for i in range(n)]
ba = 2
for i in range(m):
    a = int(eval(input())) + 1
    for j in range(ba, a):
        stair[j] = stair[j - 1] + stair[j - 2]
    ba = a + 1
for i in range(ba, n + 2):
    stair[i] = stair[i - 1] + stair[i - 2]
print((stair[n + 1] % 1000000007))

N, M = list(map(int, input().split()))
a = set()
for _ in range(M):
    A = int(eval(input()))
    a.add(A)
dp = [0 for _ in range(N + 2)]
dp[0] = 1
for i in range(N):
    if i in a:
        continue
    dp[i + 1] += dp[i]
    dp[i + 2] += dp[i]
    if dp[i + 1] > 1000000007:
        dp[i + 1] %= 1000000007
        dp[i + 2] %= 1000000007
print((dp[N] % 1000000007))

-n, m = list(map(int, input().split())) -stair = [0, 1] + [0 for i in range(n)] -ba = 2 -for i in range(m): -    a = int(eval(input())) + 1 -    for j in range(ba, a): -        stair[j] = stair[j - 1] + stair[j - 2] -    ba = a + 1 -for i in range(ba, n + 2): -    stair[i] = stair[i - 1] + stair[i - 2] -print((stair[n + 1] % 1000000007)) +N, M = list(map(int, input().split())) +a = set() +for _ in range(M): +    A = int(eval(input())) +    a.add(A) +dp = [0 for _ in range(N + 2)] +dp[0] = 1 +for i in range(N): +    if i in a: +        continue +    dp[i + 1] += dp[i] +    dp[i + 2] += dp[i] +    if dp[i + 1] > 1000000007: +        dp[i + 1] %= 1000000007 +        dp[i + 2] %= 1000000007 +print((dp[N] % 1000000007))