import bisect

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

p = [0]*(n+1)

mod = 10**9+7



a = [int(eval(input())) for i in range(m)]



p[0]=1



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

  k = bisect.bisect_left(a,i)

  k2 = bisect.bisect_right(a,i)

  if k == k2:

    p[i] += p[i-1]

    if i >= 2:

      p[i] += p[i-2]

    p[i] = p[i]%mod

#print(p)

print((p[-1]%mod))

import bisect

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

mod = 10**9+7



a = [int(eval(input())) for i in range(m)]



#dp[i]:i段目に来る場合の数

dp = [0]*(n+1)

dp[0]=1

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

  k = bisect.bisect_left(a,i)

  k2 = bisect.bisect_right(a,i)

  if k == k2:

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

    if i >= 2:

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

    dp[i] = dp[i]%mod

print((dp[-1]%mod))

import bisect

n, m = list(map(int, input().split()))
p = [0] * (n + 1)
mod = 10**9 + 7
a = [int(eval(input())) for i in range(m)]
p[0] = 1
for i in range(1, n + 1):
    k = bisect.bisect_left(a, i)
    k2 = bisect.bisect_right(a, i)
    if k == k2:
        p[i] += p[i - 1]
        if i >= 2:
            p[i] += p[i - 2]
        p[i] = p[i] % mod
# print(p)
print((p[-1] % mod))

import bisect

n, m = list(map(int, input().split()))
mod = 10**9 + 7
a = [int(eval(input())) for i in range(m)]
# dp[i]:i段目に来る場合の数
dp = [0] * (n + 1)
dp[0] = 1
for i in range(1, n + 1):
    k = bisect.bisect_left(a, i)
    k2 = bisect.bisect_right(a, i)
    if k == k2:
        dp[i] += dp[i - 1]
        if i >= 2:
            dp[i] += dp[i - 2]
        dp[i] = dp[i] % mod
print((dp[-1] % mod))

-p = [0] * (n + 1) -p[0] = 1 +# dp[i]:i段目に来る場合の数 +dp = [0] * (n + 1) +dp[0] = 1 -        p[i] += p[i - 1] +        dp[i] += dp[i - 1] -            p[i] += p[i - 2] -        p[i] = p[i] % mod -# print(p) -print((p[-1] % mod)) +            dp[i] += dp[i - 2] +        dp[i] = dp[i] % mod +print((dp[-1] % mod))