from sys import stdin

n,m = [int(x) for x in stdin.readline().rstrip().split()]

if m != 0:
    lin = [int(stdin.readline().rstrip()) for _ in range(m)]
else:
    lin = [-1]

dp = [-1 for _ in range(n+1)]
dp[0] = 1

if lin[0] == 1:
    dp[1] = 0
else:
    dp[1] = 1
    
for i in range(2,n+1):
    if i in lin:
        dp[i] = 0
    else:
        dp[i] = dp[i-1] + dp[i-2]

print(dp[n]%(10**9+7))