import sys

def main():
    N, M = map(int, input().split())
    a = [int(sys.stdin.readline().strip()) for _ in range(M)]

    dp = [0]*(N+1)

    for i in range(0, N+1):
        if i in a:
            dp[i] = 0
            continue

        if i == 0 or i == 1:
            dp[i] = 1
            continue

        dp[i] = dp[i-1] + dp[i-2]

    print(dp[N] % 1000000007)

main()