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

l=set(int(eval(input()))-1 for _ in range(m))

s,t=0,1

for i in range(n): s,t=t,(s+t)%(10**9+7)*(1-(i in l))

print(t)
import sys

f=sys.stdin.readline

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

l=set(int(f())-1 for _ in range(m))

s,t=0,1

for i in range(n): s,t=t,(s+t)%(10**9+7)*(1-(i in l))

print(t)
n, m = list(map(int, input().split()))
l = set(int(eval(input())) - 1 for _ in range(m))
s, t = 0, 1
for i in range(n):
    s, t = t, (s + t) % (10**9 + 7) * (1 - (i in l))
print(t)

import sys

f = sys.stdin.readline
n, m = list(map(int, f().split()))
l = set(int(f()) - 1 for _ in range(m))
s, t = 0, 1
for i in range(n):
    s, t = t, (s + t) % (10**9 + 7) * (1 - (i in l))
print(t)

-n, m = list(map(int, input().split())) -l = set(int(eval(input())) - 1 for _ in range(m)) +import sys + +f = sys.stdin.readline +n, m = list(map(int, f().split())) +l = set(int(f()) - 1 for _ in range(m))