n,m = map(int, input().split())
l = [int(input()) for i in range(m)]
ll = [0]*(n+2)
ll[1] = 1
for i in range(2,n+2):
    if not i-1 in l:
        ll[i] = ll[i-1] + ll[i - 2]
print(ll[-1] % 1000000007)
