n,m = map(int,input().split())
para = [int(input()) for i in range(m)]
mod = 10**9+7
 
import sys
sys.setrecursionlimit(100000)
 
dp = [1,0]
def dps(cnt,cantvisit):
    if cnt == n + 1 :
        return 
 
    else :
        if cnt == 1 :
            if cnt in cantvisit :
                dp[1] = 0
                cnt += 1
            else : 
                dp[1] = 1
                cnt += 1
        else :
            if cnt in cantvisit : 
                a  = 0 
                dp[0] = dp[1]
                dp[1] = a
                cnt += 1
            else :
                
                a  = (dp[0] + dp[1]) % mod
                dp[0] = dp[1]
                dp[1] = a 
                cnt += 1
        return dps(cnt,cantvisit)
dps(1,para)
print("{}".format(dp[1]))