from sys import stdin
N,M = [int(x) for x in stdin.readline().rstrip().split()]
data = []
for _ in range(M):
    data.append(int(input()))

ans = [1] + [0] * (N)
for i in range(1,N + 1):
    if i == 1:
        if 1 in data:
            ans[1] = 0
        else:
            ans[1] = 1
    else:
        if i in data:
            ans[i] = 0
        else:
            ans[i] = ans[i-1] + ans[i-2]
print(ans[-1] % 1000000007)