import sys
sys.stdin.readline

def fibo(n):
    if n == 1:
        return 1
    elif n == 2:
        return 2
    else:
        if n not in stars and n-1 not in stars and n-2 not in stars:
            return fibo(n-1) + fibo(n-2)
        elif n not in stars and n-1 not in stars and n-2 in stars:
            return fibo(n-1)
        elif n not in stars and n-1 in stars and n-2 not in stars:
            return fibo(n-2)
        elif n in stars:
            return 0
        else:
            print(0)
            sys.exit()

N, M = map(int, input().split())
stars = []

for i in range(M):
    a = int(input())
    stars.append(a)

print(fibo(N) % 1000000007)
