# ABC129C - Typical Stairs
import sys
input = sys.stdin.readline

n, m = list(map(int, input().rstrip().split()))
lst = list(map(int, [input().rstrip() for _ in range(m)]))
MOD = 10 ** 9 + 7

if 0 in lst:
    ans = [0, 1] + [0] * (n - 1)
if 1 in lst:
    ans = [1, 0] + [0] * (n - 1)
else:
    ans = [1, 1] + [0] * (n - 1)

for i in range(2, n + 1):
    if i in lst:
        ans[i] = 0
    else:
        ans[i] = (ans[i - 2] + ans[i - 1]) % MOD
print(ans[-1])