import sys
input=sys.stdin.readline
#import fractions
#import math
#import collections
#from collections import deque
#from bisect import bisect_left
#N = int(input())
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = list(map(int,input().split()))
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
N,M = map(int,input().split())
A = [int(input()) for _ in range(M)]  
ans = [0] * (N+3)
ans[0] = 1
for i in range(N):
    if (i+1) not in A:
        ans[i+1] += ans[i]
        ans[i+1] = ans[i+1] % 1000000007
    if (i+2) not in A:
        ans[i+2] += ans[i]
        ans[i+2] = ans[i+2] % 1000000007
print(ans[N])