import numpy as np

n, m = input().split()
n = int(n)
m = int(m)

# a[i] = 0 の床は踏めない
a = np.ones(n+1, dtype=np.bool)
for _ in range(m):
    a[int(input())] = 0

mod = 1e9 + 7

# pos[i]はi段目まで登る場合の数
pos = np.zeros(n+1)
pos[0] = 1
for i in range(n):
    if i == n - 1:
        pos[i+1] += pos[i]
    else:
        if a[i+1]:
            pos[i+1] += pos[i]
        if a[i+2]:
            pos[i+2] += pos[i]

print(int(pos[n] % mod))