# coding: utf-8
# Your code here!
import sys

def input():
    return sys.stdin.readline().strip()

N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
li = [1] + [0 for _ in range(N)]

for i in range(1, N + 1):
    if i in a:
        li[i] = 0
    else:
        li[i] = li[i - 1] + li[i - 2]
print(li[-1] % (pow(10,9) + 7))