N, M = map(int, input().split())

lst = [0] * N
skips = [int(input()) for _ in range(M)]
for x in range(N):
    if x in skips:
        lst[x] = 0
    elif x in [0, 1]:
        lst[x] = 1
    else:
        lst[x] = (lst[x - 1] + lst[x - 2]) % 1000000007

if N == 1:
    print(lst[-1])
else:
    print((lst[-1] + lst[-2]) % 1000000007)