n, m = map(int, input().split())
 
forbidden = []
for i in range(m):
  forbidden.append(int(input()))
 
ans = [1, 1]
if 1 in forbidden:
  ans[-1] = 0
for i in range(2,n+1):
  if i in forbidden:
    ans.append(0)
  else:
    ans.append(ans[-1]+ans[-2])
  if ans[-1] == 0 and ans[-2] == 0:
    print(0)
    break
  if i == n:
    print(ans[-1]%1000000007)
    break