n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
mod=10**9+7
ans=1

dp=[0]*(n+1)
dp[0]=1
dp[1]=1
for i in range(2,n+1):
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod
if m==0:
    ans=dp[n]
else:
    begin=0
    end=a[0]-1
    for i in range(m):
        end=a[i]-1
        ans*=dp[end-begin]
        
        if(i+1<m and a[i+1]==a[i]+1):
            ans=0
            break
            
        else:
            begin=end+2

    ans*=dp[n-a[m-1]-1]

print(ans%mod) n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m int(input()) for i in range(m) for i in range(m) i range(m) range m for i in range(m) int(input()) int input() input a=[int(input()) for i in range(m)] a [int(input()) for i in range(m)] mod=10**9+7 mod 10**9+7 10**9 10 9 7 ans=1 ans 1 dp=[0]*(n+1) dp [0]*(n+1) [0] 0 n+1 n 1 dp[0]=1 dp[0] dp 0 1 dp[1]=1 dp[1] dp 1 1 for i in range(2,n+1):
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod i range(2,n+1) range 2 n+1 n 1 dp[i]=dp[i-1]+dp[i-2] dp[i] dp i dp[i-1]+dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 dp[i]%=mod dp[i] dp i mod if m==0:
    ans=dp[n]
else:
    begin=0
    end=a[0]-1
    for i in range(m):
        end=a[i]-1
        ans*=dp[end-begin]
        
        if(i+1<m and a[i+1]==a[i]+1):
            ans=0
            break
            
        else:
            begin=end+2

    ans*=dp[n-a[m-1]-1] m==0 m 0 ans=dp[n] ans dp[n] dp n begin=0 begin 0 end=a[0]-1 end a[0]-1 a[0] a 0 1 for i in range(m):
        end=a[i]-1
        ans*=dp[end-begin]
        
        if(i+1<m and a[i+1]==a[i]+1):
            ans=0
            break
            
        else:
            begin=end+2

     i range(m) range m end=a[i]-1 end a[i]-1 a[i] a i 1 ans*=dp[end-begin] ans dp[end-begin] dp end-begin end begin if(i+1<m and a[i+1]==a[i]+1):
            ans=0
            break
            
        else:
            begin=end+2

     i+1<m and a[i+1]==a[i]+1 i+1<m i+1 i 1 m a[i+1]==a[i]+1 a[i+1] a i+1 i 1 a[i]+1 a[i] a i 1 ans=0 ans 0 break begin=end+2 begin end+2 end 2 ans*=dp[n-a[m-1]-1] ans dp[n-a[m-1]-1] dp n-a[m-1]-1 n-a[m-1] n a[m-1] a m-1 m 1 1 print(ans%mod) print ans%mod ans mod end=a[0]-1 a[0]-1 end m=map(int,input().split()) map(int,input().split()) m ans=1 1 ans a=[int(input()) for i in range(m)] [int(input()) for i in range(m)] a begin=0 0 begin ans=0 0 ans dp=[0]*(n+1) [0]*(n+1) dp n,m=map(int,input().split()) map(int,input().split()) n ans*=dp[end-begin] dp[end-begin] ans mod=10**9+7 10**9+7 mod ans*=dp[n-a[m-1]-1] dp[n-a[m-1]-1] ans end=a[i]-1 a[i]-1 end ans=dp[n] dp[n] ans begin=end+2 end+2 begin
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
mod=10**9+7
ans=1

dp=[0]*(n+1)
dp[0]=1
dp[1]=1
for i in range(2,n+1):
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod
if m==0:
    ans=dp[n]
else:
    begin=0
    end=a[0]-1
    for i in range(m):
        end=a[i]-1
        ans*=dp[end-begin]
        
        if(i+1<m and a[i+1]==a[i]+1):
            ans=0
            break
            
        else:
            begin=end+2

    ans*=dp[n-a[m-1]-1]

print(ans%mod)