def main():

    N, M = map(int, input().split())
    A = [int(input()) for _ in range(M)]
    stairs = [0] * N
    for i in range(N):
        if (i + 1) in A:
            stairs[i] = 0
        elif i == 0:
            stairs[i] = 1
        elif i == 1:
            stairs[i] = 1 + stairs[i - 1]
        else:
            stairs[i] = (stairs[i - 1] + stairs[i - 2]) % (10 ** 9 + 7)
    print(stairs[N - 1])

if __name__ == "__main__":
    main()