import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp % large_p
            return kazu_tmp % large_p

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()
