import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,M=MI()
    dp=[0]*(N+1)
    dp[0]=1
    a=[0]*M
    for i in range(M):
        a[i]=I()
        
    a.append(10**6)
    cur=0#aの場所
    
    for i in range(1,N+1):
        if i==a[cur]:
            cur+=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
            
    print(dp[-1])
    

main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def I(): return int(input()) I def MI(): return map(int, input().split()) MI def LI(): return list(map(int, input().split())) LI def main():
    mod=10**9+7
    N,M=MI()
    dp=[0]*(N+1)
    dp[0]=1
    a=[0]*M
    for i in range(M):
        a[i]=I()
        
    a.append(10**6)
    cur=0#aの場所
    
    for i in range(1,N+1):
        if i==a[cur]:
            cur+=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
            
    print(dp[-1])
     main mod=10**9+7 mod 10**9+7 10**9 10 9 7 N,M=MI() N MI() MI M dp=[0]*(N+1) dp [0]*(N+1) [0] 0 N+1 N 1 dp[0]=1 dp[0] dp 0 1 a=[0]*M a [0]*M [0] 0 M for i in range(M):
        a[i]=I()
        
     i range(M) range M a[i]=I() a[i] a i I() I a.append(10**6) a.append a append 10**6 10 6 cur=0 cur 0 for i in range(1,N+1):
        if i==a[cur]:
            cur+=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
            
     i range(1,N+1) range 1 N+1 N 1 if i==a[cur]:
            cur+=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
            
     i==a[cur] i a[cur] a cur cur+=1 cur 1 dp[i]=(dp[i-1]+dp[i-2])%mod dp[i] dp i (dp[i-1]+dp[i-2])%mod dp[i-1]+dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 mod print(dp[-1]) print dp[-1] dp -1 main() main input = sys.stdin.readline sys.stdin.readline input def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI def I(): return int(input()) def I(): return int(input()) I def main():
    mod=10**9+7
    N,M=MI()
    dp=[0]*(N+1)
    dp[0]=1
    a=[0]*M
    for i in range(M):
        a[i]=I()
        
    a.append(10**6)
    cur=0#aの場所
    
    for i in range(1,N+1):
        if i==a[cur]:
            cur+=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
            
    print(dp[-1])
     def main():
    mod=10**9+7
    N,M=MI()
    dp=[0]*(N+1)
    dp[0]=1
    a=[0]*M
    for i in range(M):
        a[i]=I()
        
    a.append(10**6)
    cur=0#aの場所
    
    for i in range(1,N+1):
        if i==a[cur]:
            cur+=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
            
    print(dp[-1])
     main
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,M=MI()
    dp=[0]*(N+1)
    dp[0]=1
    a=[0]*M
    for i in range(M):
        a[i]=I()
        
    a.append(10**6)
    cur=0#aの場所
    
    for i in range(1,N+1):
        if i==a[cur]:
            cur+=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
            
    print(dp[-1])
    

main()
