n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
res_arr = [0] * n

for i in range(1, n):
    if i in a:
        res_arr[i] = 0
    elif i == 1:
        res_arr[i] = 1
    elif i == 2:
        res_arr[i] = 1 + res_arr[i-1]
    else:
        res_arr[i] = res_arr[i-1] + res_arr[i-2]

res = res_arr[-1]+res_arr[-2]
amari = res % 1000000007
print(amari)
