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



mod_num = 10 ** 9 + 7

a = [0] * N



for i in range(M):

    a[i] = int(eval(input()))



val = [0,1]

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

    ans = (val[0] + val[1]) % mod_num

    val[0] = val[1]

    val[1] = ans

    if len(a) > 0:

        if i == a[0]:

            val[1] = 0

            a.pop(0)

 

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



mod_num = 10 ** 9 + 7

a = [0] * N



for i in range(M):

    a[i] = int(eval(input()))



val = [0,1]

j = 0

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

    ans = (val[0] + val[1]) % mod_num

    val[0] = val[1]

    val[1] = ans

    if len(a) > 0:

        if i == a[j]:

            val[1] = 0

            if len(a) - 1 != j:

                j += 1

 

print(ans)
N, M = list(map(int, input().split()))
mod_num = 10**9 + 7
a = [0] * N
for i in range(M):
    a[i] = int(eval(input()))
val = [0, 1]
for i in range(1, N + 1):
    ans = (val[0] + val[1]) % mod_num
    val[0] = val[1]
    val[1] = ans
    if len(a) > 0:
        if i == a[0]:
            val[1] = 0
            a.pop(0)
print(ans)

N, M = list(map(int, input().split()))
mod_num = 10**9 + 7
a = [0] * N
for i in range(M):
    a[i] = int(eval(input()))
val = [0, 1]
j = 0
for i in range(1, N + 1):
    ans = (val[0] + val[1]) % mod_num
    val[0] = val[1]
    val[1] = ans
    if len(a) > 0:
        if i == a[j]:
            val[1] = 0
            if len(a) - 1 != j:
                j += 1
print(ans)

+j = 0 -        if i == a[0]: +        if i == a[j]: -            a.pop(0) +            if len(a) - 1 != j: +                j += 1