import sys
input = sys.stdin.readline

n,m = map(int,input().split())
a = [int(input()) for i in range(m)]

dp = [0]*(n+10)
dp[0] = 1

for i in range(0, n):
    if i in a:
        continue
    dp[i+2] += dp[i]
    dp[i+1] += dp[i]
print(dp[n]%1000000007)