N, M = map(int, input().split())
z = [-1] * (N+1)
for i in range(M):
     z[int(input())] = 0

def rootCount(x):
     if x == 0:
          z[x] = 1
          return 1
     elif x == 1:
          if z[x] == 0:
               return 0
          else:
               z[x] = 1
               return 1
     elif x < N+1 and z[x] != -1:
          return z[x]
     else:
          z[x] = rootCount(x-1) + rootCount(x-2)
          return z[x]
print(rootCount(N) % 1000000007)
