n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
s = [1] * (n + 1)
if 1 in a:
    s[1] = 0
for i in range(2, n + 1):
    if i in a:
        s[i] = 0
    else:
        if s[i - 2] == 0 and s[i - 1] == 0:
            print(0)
            exit()
        else:
            s[i] = s[i - 1] + s[i - 2]   
print(s[n] % 1000000007)