number = 1000000007

fib = [1,1,2,3,5,8,13]

def fibon(n):

  if(n+1> len(fib)):

    while(len(fib) < n+1):

      fib.append(fib[-1]+ fib[-2])

  return fib[n]

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

start = 0

ans = 1

for i in range(m):

  broken = int(eval(input()))

  if broken - start == 0:

    print((0))

    exit(0)

  ans *= fibon(broken-start-1)

  ans = ans % number

  start = broken + 1

else:

  ans *= fibon(n-start)

  ans = ans % number

print(ans)
CONST = 10**9 + 7

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



dp = [-1 for _ in range(n+1)]

dp[0] = 1

dp[1] = 1

for _ in range(m):

  a = int(eval(input()))

  dp[a] = 0





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

  if dp[i] == 0:

    continue

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

print((dp[n]))





number = 1000000007
fib = [1, 1, 2, 3, 5, 8, 13]


def fibon(n):
    if n + 1 > len(fib):
        while len(fib) < n + 1:
            fib.append(fib[-1] + fib[-2])
    return fib[n]


n, m = list(map(int, input().split()))
start = 0
ans = 1
for i in range(m):
    broken = int(eval(input()))
    if broken - start == 0:
        print((0))
        exit(0)
    ans *= fibon(broken - start - 1)
    ans = ans % number
    start = broken + 1
else:
    ans *= fibon(n - start)
    ans = ans % number
print(ans)

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

-number = 1000000007 -fib = [1, 1, 2, 3, 5, 8, 13] - - -def fibon(n): -    if n + 1 > len(fib): -        while len(fib) < n + 1: -            fib.append(fib[-1] + fib[-2]) -    return fib[n] - - +CONST = 10**9 + 7 -start = 0 -ans = 1 -for i in range(m): -    broken = int(eval(input())) -    if broken - start == 0: -        print((0)) -        exit(0) -    ans *= fibon(broken - start - 1) -    ans = ans % number -    start = broken + 1 -else: -    ans *= fibon(n - start) -    ans = ans % number -print(ans) +dp = [-1 for _ in range(n + 1)] +dp[0] = 1 +dp[1] = 1 +for _ in range(m): +    a = int(eval(input())) +    dp[a] = 0 +for i in range(2, n + 1): +    if dp[i] == 0: +        continue +    dp[i] = (dp[i - 1] + dp[i - 2]) % CONST +print((dp[n]))