
import sys
input = sys.stdin.readline
def isSafe(position):
    return not position in listM


STEP = 2
N,M = map(int,input().split())
dp = [0] * (N+1)
cnt = 0


listM=[int(input()) for i in range(M)]
dp[0] = 1

for i in range(N):
    if i+1 > N:
        break
    if isSafe(i+1):
        dp[i+1] += dp[i]
    if i+2 > N:
        break
    if isSafe(i+2):
        dp[i+2] += dp[i]
        #dp[j] = 0
    #print(dp)
        
print(dp[N] % 1000000007)