import sys
def fb(num):
    a, b = 1, 0
    for _ in range(num):
        a, b = a + b, a
    return b

n,m = map(int,input().split())
broken = []
for i in range(m):
  broken.append(int(input()))
  if(len(broken) >= 2):
    if(broken[i] - broken[i-1] == 1):
      print("0")
      sys.exit()

ans = fb(n-m) % 1000000007 -1
print(ans)