LARGE = 1000000007


def step(a, i):
    if i == len(a):
        return 1
    elif i > len(a):
        return 0

    elif a[i] == 0:
        return 0

    return step(a, i + 1) + step(a, i + 2)


def solve():
    n, m = [int(x) for x in input().split()]
    a = [1] * n
    for _ in range(m):
        a[int(input())] = 0

    # print(n, m)
    # print(a)

    ans = step(a, 0)
    print(ans % LARGE)


if __name__ == '__main__':
    solve()
