# ABC129C - Typical Stairs
import sys
input = sys.stdin.readline

n, m = list(map(int, input().rstrip().split()))
lst = list(map(int, [input().rstrip() for _ in range(m)]))
MOD = 10 ** 9 + 7

if 0 in lst:
    a, b = 0, 1
if 1 in lst:
    a, b = 1, 0
else:
    a, b = 1, 1

for i in range(2, n + 1):
    if a == 0 and b == 0:
        print(0)
        break
    if i in lst:
        a = b
        b = 0
    else:
        tmp = b
        b = (a + b) % MOD
        a = tmp
else:
    print(b)