import sys
n, m = map(int, input().split())

As = []
a_ = -1
for i in range(m):
  a = int(input())
  if a == a_ + 1:
    print(0)
    sys.exit()
  As.append(a)
  a_ = a

nums = [1]
if 1 in As:
  nums.append(0)
else:
  nums.append(1)
  
for i in range(2, n + 1):
  if i in As:
    nums.append(0)
  else:
    nums.append((nums[i-1] + nums[i-2]) % 1000000007)
    
print(nums[-1])