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

A=[]

B=[True]*(N+1)

DP=[0]*(N+1)

DP[0]=1

for i in range(M):

  A.append(int(eval(input())))

for i in range(M):

  B[A[i]]=False

#print(B)



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

  if B[i]==False:

    DP[i]=0

  else:

    if i==1:

      DP[i]=DP[i-1]

    else:

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

if DP[N]==0:

  print((0))

else:

  print((DP[N]%1000000007))
N,M=list(map(int,input().split()))

A=[]

B=[True]*(N+1)

DP=[0]*(N+1)

DP[0]=1

for i in range(M):

  A.append(int(eval(input())))

for i in range(M):

  B[A[i]]=False

#print(B)



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

  if B[i]==False:

    DP[i]=0

  else:

    if i==1:

      DP[i]=DP[i-1]

    else:

      DP[i]=(DP[i-1]+DP[i-2])%1000000007

if DP[N]==0:

  print((0))

else:

  print((DP[N]))
N, M = list(map(int, input().split()))
A = []
B = [True] * (N + 1)
DP = [0] * (N + 1)
DP[0] = 1
for i in range(M):
    A.append(int(eval(input())))
for i in range(M):
    B[A[i]] = False
# print(B)
for i in range(1, N + 1):
    if B[i] == False:
        DP[i] = 0
    else:
        if i == 1:
            DP[i] = DP[i - 1]
        else:
            DP[i] = DP[i - 1] + DP[i - 2]
if DP[N] == 0:
    print((0))
else:
    print((DP[N] % 1000000007))

N, M = list(map(int, input().split()))
A = []
B = [True] * (N + 1)
DP = [0] * (N + 1)
DP[0] = 1
for i in range(M):
    A.append(int(eval(input())))
for i in range(M):
    B[A[i]] = False
# print(B)
for i in range(1, N + 1):
    if B[i] == False:
        DP[i] = 0
    else:
        if i == 1:
            DP[i] = DP[i - 1]
        else:
            DP[i] = (DP[i - 1] + DP[i - 2]) % 1000000007
if DP[N] == 0:
    print((0))
else:
    print((DP[N]))

-            DP[i] = DP[i - 1] + DP[i - 2] +            DP[i] = (DP[i - 1] + DP[i - 2]) % 1000000007 -    print((DP[N] % 1000000007)) +    print((DP[N]))