#!/usr/bin/env python3
import sys

sys.setrecursionlimit(1000000)

n, m, *a = map(int, open(0).read().split())
memo = [0] * (n+ 1)


def count(n):
    if n < 2:
        return 1
    if memo[n] != 0:
        return memo[n]
    memo[n] = (count(n - 1)*(n-1 not in a) + count(n - 2)*(n-2 not in a) )%(10**9+7)
    return memo[n]

print(count(n))
