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

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



st = [1]*(n+1)

for i in range(m):

    st[li[i]-1] = 0



if st[0] == 0 and st[1] == 0:

    print((0))

    exit()

elif st[0] == 0 and st[1] != 0:

    st[1] = 1

elif st[0] == 1 and st[1] != 0:

    st[1] = 2



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

    if st[i] == 0:

        continue

    else:

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

print((st[n-1]))

    

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

dp = [-1]*(n+1) 

dp[0] = 1

mod = 10**9 + 7

for i in range(m):

    a = int(eval(input()))

    dp[a-1] = 0

#print(dp)

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

    if dp[i] == 0:

        continue

    else:

        if i == 1:

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

        else:

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

        #print(dp)

print((dp[n-1]))
n, m = list(map(int, input().split()))
li = [int(eval(input())) for i in range(m)]
st = [1] * (n + 1)
for i in range(m):
    st[li[i] - 1] = 0
if st[0] == 0 and st[1] == 0:
    print((0))
    exit()
elif st[0] == 0 and st[1] != 0:
    st[1] = 1
elif st[0] == 1 and st[1] != 0:
    st[1] = 2
for i in range(2, n + 1):
    if st[i] == 0:
        continue
    else:
        st[i] = (st[i - 1] + st[i - 2]) % 1000000007
print((st[n - 1]))

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

-li = [int(eval(input())) for i in range(m)] -st = [1] * (n + 1) +dp = [-1] * (n + 1) +dp[0] = 1 +mod = 10**9 + 7 -    st[li[i] - 1] = 0 -if st[0] == 0 and st[1] == 0: -    print((0)) -    exit() -elif st[0] == 0 and st[1] != 0: -    st[1] = 1 -elif st[0] == 1 and st[1] != 0: -    st[1] = 2 -for i in range(2, n + 1): -    if st[i] == 0: +    a = int(eval(input())) +    dp[a - 1] = 0 +# print(dp) +for i in range(1, n + 1): +    if dp[i] == 0: -        st[i] = (st[i - 1] + st[i - 2]) % 1000000007 -print((st[n - 1])) +        if i == 1: +            dp[i] = dp[i - 1] + 1 +        else: +            dp[i] = (dp[i - 1] + dp[i - 2]) % mod +        # print(dp) +print((dp[n - 1]))