import sys
sys.setrecursionlimit(10**6) 
N, M = map(int, input().split())
is_stairs = [1] * (N)

for i in range(M):
    a = int(input())
    is_stairs[a-1] = 0

memo = [0] * (N)
def routes(n):
    if n == 1:
        if is_stairs[0]:
            return 1
        else:
            return 0
    elif n == 2:
        if is_stairs[0] and is_stairs[1]:
            return 2
        elif not is_stairs[0] and is_stairs[1]:
            return 1
        else:
            return 0
    else:
        if memo[n-1]:
            return memo[n-1]
        else:
            if is_stairs[n-1]:
                memo[n-1] = routes(n-1) + routes(n-2)
                return memo[n-1]
            else:
                return 0

total = routes(N)
print(total % 1000000007)
