mod = 1000000007
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
count = [0 for _ in range(n+1)]
count[1] = 1
count[0] = 1
for num in a:
  count[num] = -1

for i in range(1, n+1):
  if count[i] != -1:
    count[i] = (count[i-1] + count[i-2])
    count[i] %= mod
  else:
    count[i] = 0
print(count[-1]%mod)