n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
if n==1:
    print(1)
    exit()
for i in range(m-1):
    if a[i+1]-a[i]==1:
        print(0)
        exit()
ans=1
a.append(n+1)
for i in range(m+1):
    if i==0:
        l=[1,1]
        for j in range(1,a[i]-1):
            l.append(l[-1]+l[-2])
        ans*=l[-1]
        ans%=(10**9 +7)
        #print(l)
    else:
        l=[1,1]
        for j in range(a[i-1]+2,a[i]-1):
            l.append(l[-1]+l[-2])
        ans*=l[-1]
        ans%=(10**9 +7)
        #print(l)
print(ans) n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m int(input()) for _ in range(m) for _ in range(m) _ range(m) range m for _ in range(m) int(input()) int input() input a=[int(input()) for _ in range(m)] a [int(input()) for _ in range(m)] if n==1:
    print(1)
    exit() n==1 n 1 print(1) print 1 exit() exit for i in range(m-1):
    if a[i+1]-a[i]==1:
        print(0)
        exit() i range(m-1) range m-1 m 1 if a[i+1]-a[i]==1:
        print(0)
        exit() a[i+1]-a[i]==1 a[i+1]-a[i] a[i+1] a i+1 i 1 a[i] a i 1 print(0) print 0 exit() exit ans=1 ans 1 a.append(n+1) a.append a append n+1 n 1 for i in range(m+1):
    if i==0:
        l=[1,1]
        for j in range(1,a[i]-1):
            l.append(l[-1]+l[-2])
        ans*=l[-1]
        ans%=(10**9 +7)
        #print(l)
    else:
        l=[1,1]
        for j in range(a[i-1]+2,a[i]-1):
            l.append(l[-1]+l[-2])
        ans*=l[-1]
        ans%=(10**9 +7)
        #print(l) i range(m+1) range m+1 m 1 if i==0:
        l=[1,1]
        for j in range(1,a[i]-1):
            l.append(l[-1]+l[-2])
        ans*=l[-1]
        ans%=(10**9 +7)
        #print(l)
    else:
        l=[1,1]
        for j in range(a[i-1]+2,a[i]-1):
            l.append(l[-1]+l[-2])
        ans*=l[-1]
        ans%=(10**9 +7)
        #print(l) i==0 i 0 l=[1,1] l [1,1] 1 1 for j in range(1,a[i]-1):
            l.append(l[-1]+l[-2])
         j range(1,a[i]-1) range 1 a[i]-1 a[i] a i 1 l.append(l[-1]+l[-2]) l.append l append l[-1]+l[-2] l[-1] l -1 l[-2] l -2 ans*=l[-1] ans l[-1] l -1 ans%=(10**9 +7) ans 10**9 +7 10**9 10 9 7 l=[1,1] l [1,1] 1 1 for j in range(a[i-1]+2,a[i]-1):
            l.append(l[-1]+l[-2])
         j range(a[i-1]+2,a[i]-1) range a[i-1]+2 a[i-1] a i-1 i 1 2 a[i]-1 a[i] a i 1 l.append(l[-1]+l[-2]) l.append l append l[-1]+l[-2] l[-1] l -1 l[-2] l -2 ans*=l[-1] ans l[-1] l -1 ans%=(10**9 +7) ans 10**9 +7 10**9 10 9 7 print(ans) print ans a=[int(input()) for _ in range(m)] [int(input()) for _ in range(m)] a l=[1,1] [1,1] l ans*=l[-1] l[-1] ans n,m=map(int,input().split()) map(int,input().split()) n ans*=l[-1] l[-1] ans m=map(int,input().split()) map(int,input().split()) m ans%=(10**9 +7) 10**9 +7 ans l=[1,1] [1,1] l ans=1 1 ans ans%=(10**9 +7) 10**9 +7 ans
n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
if n==1:
    print(1)
    exit()
for i in range(m-1):
    if a[i+1]-a[i]==1:
        print(0)
        exit()
ans=1
a.append(n+1)
for i in range(m+1):
    if i==0:
        l=[1,1]
        for j in range(1,a[i]-1):
            l.append(l[-1]+l[-2])
        ans*=l[-1]
        ans%=(10**9 +7)
        #print(l)
    else:
        l=[1,1]
        for j in range(a[i-1]+2,a[i]-1):
            l.append(l[-1]+l[-2])
        ans*=l[-1]
        ans%=(10**9 +7)
        #print(l)
print(ans)