N, M = map(int, input().split())
broken_data = [int(input()) for _ in range(M) ]
ans = 0

memo = [-1] * (N+1)
def countWays(n):
    if n < 0 or (n in broken_data):
        return 0
    elif n == 0:
        return 1
    else:
        if memo[n] > -1:
            return memo[n]
        else:
            memo[n] = countWays(n-1) + countWays(n-2)
            return memo[n]

print(countWays(N) % 1000000007)
