#-*- coding:utf-8 -*-



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

hsh = {}

for i in range(M):

    hsh[int(eval(input()))] = True



acc = [0]*(N+1)

acc[0] = 1



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

    d = 0

    if i > 1 and i-2 not in hsh:  # 2段前が穴ではない

        if i-1 not in hsh:  # 1段前が穴ではない

            d += acc[i-1] + acc[i-2]

        else: 

            d += acc[i-2]

    else:  # 2段前が穴

        if i-1 not in hsh: # 1段前が穴ではない

            d += acc[i-1]

        else:

            d = 0

    acc[i] = d



# print(hsh)

# print(acc)

print((acc[-1]%1000000007))

#-*- coding:utf-8 -*-



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

hsh = {}

for i in range(M):

    hsh[int(eval(input()))] = True



acc = [0 for _ in range(N+1)]

acc[0] = 1



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

    if i > 1 and i-2 in hsh:  # 2段前が穴

        if i-1 in hsh: # 1段前が穴

            d = 0

        else:

            d = acc[i-1]

    else:  # 2段前が穴ではない

        s = acc[i-2] if i > 1 else 0

        if i-1 in hsh:  # 1段前が穴

            d = s

        else: 

            d = acc[i-1] + s

    acc[i] = d



# print(hsh)

# print(acc)

print((acc[-1]%1000000007))

# -*- coding:utf-8 -*-
N, M = list(map(int, input().split()))
hsh = {}
for i in range(M):
    hsh[int(eval(input()))] = True
acc = [0] * (N + 1)
acc[0] = 1
for i in range(1, N + 1):
    d = 0
    if i > 1 and i - 2 not in hsh:  # 2段前が穴ではない
        if i - 1 not in hsh:  # 1段前が穴ではない
            d += acc[i - 1] + acc[i - 2]
        else:
            d += acc[i - 2]
    else:  # 2段前が穴
        if i - 1 not in hsh:  # 1段前が穴ではない
            d += acc[i - 1]
        else:
            d = 0
    acc[i] = d
# print(hsh)
# print(acc)
print((acc[-1] % 1000000007))

# -*- coding:utf-8 -*-
N, M = list(map(int, input().split()))
hsh = {}
for i in range(M):
    hsh[int(eval(input()))] = True
acc = [0 for _ in range(N + 1)]
acc[0] = 1
for i in range(1, N + 1):
    if i > 1 and i - 2 in hsh:  # 2段前が穴
        if i - 1 in hsh:  # 1段前が穴
            d = 0
        else:
            d = acc[i - 1]
    else:  # 2段前が穴ではない
        s = acc[i - 2] if i > 1 else 0
        if i - 1 in hsh:  # 1段前が穴
            d = s
        else:
            d = acc[i - 1] + s
    acc[i] = d
# print(hsh)
# print(acc)
print((acc[-1] % 1000000007))

-acc = [0] * (N + 1) +acc = [0 for _ in range(N + 1)] -    d = 0 -    if i > 1 and i - 2 not in hsh:  # 2段前が穴ではない -        if i - 1 not in hsh:  # 1段前が穴ではない -            d += acc[i - 1] + acc[i - 2] +    if i > 1 and i - 2 in hsh:  # 2段前が穴 +        if i - 1 in hsh:  # 1段前が穴 +            d = 0 -            d += acc[i - 2] -    else:  # 2段前が穴 -        if i - 1 not in hsh:  # 1段前が穴ではない -            d += acc[i - 1] +            d = acc[i - 1] +    else:  # 2段前が穴ではない +        s = acc[i - 2] if i > 1 else 0 +        if i - 1 in hsh:  # 1段前が穴 +            d = s -            d = 0 +            d = acc[i - 1] + s