N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
ans = [0 for _ in range(N)]

if 1 not in A:
    ans[0] += 1
if 2 not in A:
    ans[1] += 1

for i in range(N):
    if i+1 in A:
        continue
    else:
        if i+2 <= N-1:
            if i+2 not in A:
                if i+3 not in A:
                    ans[i+1] += ans[i]
                    ans[i+2] += ans[i]
                else:
                    ans[i+1] += ans[i]
            else:
                if i+3 not in A:
                    ans[i+2] += ans[i]
                else:
                    continue
        elif i+1 <= N-1:
            if i+2 not in A:
                ans[i+1] += ans[i]
            else:
                continue
        else:
            continue
print(ans[-1] % (10 ** 9 + 7))