import sys
input = sys.stdin.readline

n, m = map(int, input().split())
broken = [int(input()) for _ in range(m)]
f = [1, 1]

for i in range(2, n+1):
  f_nm1 = f[i-1] if i-1 not in broken else 0
  f_nm2 = f[i-2] if i-2 not in broken else 0
  f.append(f_nm1 + f_nm2)

print(f[-1]%1000000007)
