import sys
n, m = map(int, input().split())
kaidan = [1] * (n+1)
for _ in range(m):
    a = int(input())
    kaidan[a] = -1

def fib(n):    
    if n == 1:
        return 0
    elif n == 2:
        return 1
    else:
        return fib(n-1)+fib(n-2)

ans = 1
renzoku = 0
koshou = 0
for i in range(n+2):
    if i == n+1:
        temp = fib(renzoku+1)
        ans = ans * temp
    elif kaidan[i] == 1:
        renzoku += 1
        koshou = 0
    else:
        koshou += 1
        if koshou == 2:
            print(0)
            sys.exit()
        else:
            temp = fib(renzoku+1)
            ans = ans * temp
        renzoku = 0

print(ans%1000000007)