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