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

for s1, s2 in zip(A[1:], A[:-1]):
    if s1 - s2 == 1:
        print(0)
        break

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