#!/usr/bin/env python3

from functools import lru_cache

a = {-1}


@lru_cache(maxsize=None)
def solv(n):
    if n == 0:
        return 1
    count = 0
    if (n-2) not in a:
        count += solv(n-2)
    if (n-1) not in a:
        count += solv(n-1)
    return count


if __name__ == '__main__':

    n, m = map(int, input().split())
    for _ in range(m):
        a.add(int(input()))

    ans = solv(n)

    print(ans % 1000000007)
