def mi():
    return map(int, input().split())
'''
3 4
*G*S
G**S
*G*S
'''
n,m = mi()
b = [1]*(n+1)
for i in range(m):
    b[int(input())] = 0
dp = [0]*(n+1)
if b[1]==0:
    dp[1] = 1
dp[0] = 1
for i in range(2, n+1):
    if b[i-1] and b[i-2]:
        dp[i] = dp[i-1]+dp[i-2]
    elif b[i-1]:
        dp[i] = dp[i-1]
    elif b[i-2]:
        dp[i] = dp[i-2]
    else:
        print(i, b[i-1], b[i-2])
        print(0)
        exit()
print(dp[-1]%(10**9+7))