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

a = [-1]

for i in range(M):

  a.append(int(eval(input())))



# a = [int(input()) for i in range(M)]

a.append(N+1)

# print(N,M)

# print(a)



diff = []

diffmax = 0

for i, v in enumerate(a):

  if i != len(a)-1:

    steps = a[i+1] - a[i]

    diff.append(steps)

    if diffmax < steps:

      diffmax = steps



#print(diff)

      

actptn = [0,1]

for i in range(2,diffmax):

  actptn.append(actptn[i-1] + actptn[i-2])

#print(len(actptn))



ans = 1

for i in diff:

  ans = (ans* actptn[i-1]) % 1000000007

print(ans)

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

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



MOD = 10 ** 9 + 7

dp = [0] * (n + 1)



dp[0] = 1

if 1 not in A:

  dp[1] = 1



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

  if i not in A:

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



print((dp[-1]))
N, M = list(map(int, input().split()))
a = [-1]
for i in range(M):
    a.append(int(eval(input())))
# a = [int(input()) for i in range(M)]
a.append(N + 1)
# print(N,M)
# print(a)
diff = []
diffmax = 0
for i, v in enumerate(a):
    if i != len(a) - 1:
        steps = a[i + 1] - a[i]
        diff.append(steps)
        if diffmax < steps:
            diffmax = steps
# print(diff)
actptn = [0, 1]
for i in range(2, diffmax):
    actptn.append(actptn[i - 1] + actptn[i - 2])
# print(len(actptn))
ans = 1
for i in diff:
    ans = (ans * actptn[i - 1]) % 1000000007
print(ans)

n, m = list(map(int, input().split()))
A = set([int(eval(input())) for _ in range(m)])
MOD = 10**9 + 7
dp = [0] * (n + 1)
dp[0] = 1
if 1 not in A:
    dp[1] = 1
for i in range(2, n + 1):
    if i not in A:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
print((dp[-1]))

-N, M = list(map(int, input().split())) -a = [-1] -for i in range(M): -    a.append(int(eval(input()))) -# a = [int(input()) for i in range(M)] -a.append(N + 1) -# print(N,M) -# print(a) -diff = [] -diffmax = 0 -for i, v in enumerate(a): -    if i != len(a) - 1: -        steps = a[i + 1] - a[i] -        diff.append(steps) -        if diffmax < steps: -            diffmax = steps -# print(diff) -actptn = [0, 1] -for i in range(2, diffmax): -    actptn.append(actptn[i - 1] + actptn[i - 2]) -# print(len(actptn)) -ans = 1 -for i in diff: -    ans = (ans * actptn[i - 1]) % 1000000007 -print(ans) +n, m = list(map(int, input().split())) +A = set([int(eval(input())) for _ in range(m)]) +MOD = 10**9 + 7 +dp = [0] * (n + 1) +dp[0] = 1 +if 1 not in A: +    dp[1] = 1 +for i in range(2, n + 1): +    if i not in A: +        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD +print((dp[-1]))