def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    [n, m] = li()
    broken = [int(input()) for _ in range(m)]

    pattern = [0] * (n + 1)
    pattern[0] = 1
    pattern[1] = 1 if broken[0] != 1 else 0
    for i in range(2, n + 1):
        if broken.count(i) == 0:
            pattern[i] = (pattern[i - 2] + pattern[i - 1]) % (10 ** 9 + 7)
        else:
            pattern[i] = 0
    print(pattern[-1])
