OK = 0

BRO = 1

MOD = 1000000007



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

Broken=[int(eval(input())) for i in range(M)]

#K = "".join(list(BRO if i in Broken else OK for i in range(N+1)))

K = list(0 for i in range(N+1))

for i in range(M):

  K[Broken[i]] = 1

  

dp=[0 for i in range(N+1)]

dp[0]=1

for i in range(N):

  for j in range(i+1,min(i+2+1,N+1)):

    if K[j]==OK:

      dp[j]+=dp[i]

      dp[j]%=MOD

      

print((dp[N]))

OK = 0

BRO = 1



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

Broken=[int(eval(input())) for i in range(M)]

#K = "".join(list(BRO if i in Broken else OK for i in range(N+1)))

K = list(0 for i in range(N+1))

for i in range(M):

  K[Broken[i]] = 1

  

if N == 1:

  print((1))

  exit()

  

c=[0 for i in range(N+1)]

if K[N-1]==OK:

  c[1]=1

if K[N-2]==OK and K[N-1]==OK:

  c[2]=2

if K[N-2]==OK and K[N-1]==BRO:

  c[2]=1



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

  if K[N-i]==OK:

    if K[N-i+1]==OK and K[N-i+2]==OK:

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

    if K[N-i+1]==OK and K[N-i+2]==BRO:

      c[i]=c[i-1]

    if K[N-i+1]==BRO and K[N-i+2]==OK:

      c[i]=c[i-2]

  c[i]%=1000000007

  

print((c[N] % 1000000007))

OK = 0
BRO = 1
MOD = 1000000007
N, M = list(map(int, input().split()))
Broken = [int(eval(input())) for i in range(M)]
# K = "".join(list(BRO if i in Broken else OK for i in range(N+1)))
K = list(0 for i in range(N + 1))
for i in range(M):
    K[Broken[i]] = 1
dp = [0 for i in range(N + 1)]
dp[0] = 1
for i in range(N):
    for j in range(i + 1, min(i + 2 + 1, N + 1)):
        if K[j] == OK:
            dp[j] += dp[i]
            dp[j] %= MOD
print((dp[N]))

OK = 0
BRO = 1
N, M = list(map(int, input().split()))
Broken = [int(eval(input())) for i in range(M)]
# K = "".join(list(BRO if i in Broken else OK for i in range(N+1)))
K = list(0 for i in range(N + 1))
for i in range(M):
    K[Broken[i]] = 1
if N == 1:
    print((1))
    exit()
c = [0 for i in range(N + 1)]
if K[N - 1] == OK:
    c[1] = 1
if K[N - 2] == OK and K[N - 1] == OK:
    c[2] = 2
if K[N - 2] == OK and K[N - 1] == BRO:
    c[2] = 1
for i in range(3, N + 1):
    if K[N - i] == OK:
        if K[N - i + 1] == OK and K[N - i + 2] == OK:
            c[i] = c[i - 1] + c[i - 2]
        if K[N - i + 1] == OK and K[N - i + 2] == BRO:
            c[i] = c[i - 1]
        if K[N - i + 1] == BRO and K[N - i + 2] == OK:
            c[i] = c[i - 2]
    c[i] %= 1000000007
print((c[N] % 1000000007))

-MOD = 1000000007 -dp = [0 for i in range(N + 1)] -dp[0] = 1 -for i in range(N): -    for j in range(i + 1, min(i + 2 + 1, N + 1)): -        if K[j] == OK: -            dp[j] += dp[i] -            dp[j] %= MOD -print((dp[N])) +if N == 1: +    print((1)) +    exit() +c = [0 for i in range(N + 1)] +if K[N - 1] == OK: +    c[1] = 1 +if K[N - 2] == OK and K[N - 1] == OK: +    c[2] = 2 +if K[N - 2] == OK and K[N - 1] == BRO: +    c[2] = 1 +for i in range(3, N + 1): +    if K[N - i] == OK: +        if K[N - i + 1] == OK and K[N - i + 2] == OK: +            c[i] = c[i - 1] + c[i - 2] +        if K[N - i + 1] == OK and K[N - i + 2] == BRO: +            c[i] = c[i - 1] +        if K[N - i + 1] == BRO and K[N - i + 2] == OK: +            c[i] = c[i - 2] +    c[i] %= 1000000007 +print((c[N] % 1000000007))