n, m = map(int, input().split())
flag = [True] * n
cnt = [0] * n
for i in range(m):
    a = int(input())
    flag[a - 1] = False

for i in range(n - 1, -1, -1):
    if flag[i]:
        if i == n - 1 or i == n - 2:
            cnt[i] = 1
        else:
            cnt[i] = (cnt[i + 1] + cnt[i + 2]) % (10 ** 9 + 7)
    else:
        cnt[i] = 0
print (cnt[0]+ cnt[1])