# -*- coding: utf-8 -*-
N, M = map(int, input().split())
A = []
for _ in range(M):
    A.append(int(input()))

num_goup = [1]
for s in range(1, N + 1):
    if s in A:
        if num_goup[-1] == 0:
            break
        num_goup.append(0)
        continue
    
    if s == 1:
        num_goup.append(1)
        continue
    
    if num_goup[-1] == 0:
        if num_goup[-2] == 0:
            num_goup.append(0)
            break
        else:
            num_goup.append(num_goup[-2])
    else:
        if num_goup[-2] == 0:
            num_goup.append(num_goup[-1])
        else:
            num_goup.append(num_goup[-1] + num_goup[-2])
    
print(num_goup[-1] % 1000000007)