N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]

if 1 in a and 2 in a:
  print(0)
else:
  i1 = 0
  i2 = 1
  i3 = 0
  for i in range(1, N+1): #インデックスは-1
    if i in a:
      i1 = i2
      i2 = i3
      i3 = 0
    else:
      i3 = i1 + i2
      i1 = i2
      i2 = i3
      i3 = 0
  
  print(i3%1000000007)