import sys

def main():
    input = sys.stdin.readline
    MOD = 10**9 + 7
    N, M = map(int, input().split())
    A = [int(input()) for _ in range(M)]

    dp = [0] * (N+2)
    dp[1] = 1
    for i in range(N):
        step = i+2
        if i+1 in A:
            dp[step] = 0
        else:
            dp[step] = dp[step-1] + dp[step-2]
            dp[step] %= MOD

    return dp[N+1]


if __name__ == '__main__':
    print(main())
