#!/usr/bin/env python3

n, m = list(map(int, input().split()))

a = [int(input()) for _ in range(m)]

mod = 1000000007

a_2, a_1, a_now = 1, 0, 0

if 1 in a:
    a_1 = 0
else:
    a_1 = 1

for i in range(2, n+1):
    if i in a:
        a_now = 0
    else:
        a_now = a_1+a_2
    # print(a_now)
    a_1, a_2 = a_now, a_1

print(a_now % mod)

# 0, 1, 2, 3, 4, 5, 6

# 1, 1, 2, 0, 2, 2, 4
