import math
n,m=map(int,input().split())
h=[0 for _ in range(n+1)]
dp=[0 for _ in range(n+1)]
for i in range(m):
	s=int(input())
	h[s]=1
dp[0]=1
if h[1]==1:
	dp[1]=0
else:
	dp[1]=1
for i in range(2,n+1):
	if h[i]==1:
		dp[i]==0
	else:
		dp[i]=dp[i-1]+dp[i-2]
print(dp[n]%1000000007) import math math n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m 0 for _ in range(n+1) for _ in range(n+1) _ range(n+1) range n+1 n 1 for _ in range(n+1) 0 h=[0 for _ in range(n+1)] h [0 for _ in range(n+1)] 0 for _ in range(n+1) for _ in range(n+1) _ range(n+1) range n+1 n 1 for _ in range(n+1) 0 dp=[0 for _ in range(n+1)] dp [0 for _ in range(n+1)] for i in range(m):
	s=int(input())
	h[s]=1 i range(m) range m s=int(input()) s int(input()) int input() input h[s]=1 h[s] h s 1 dp[0]=1 dp[0] dp 0 1 if h[1]==1:
	dp[1]=0
else:
	dp[1]=1 h[1]==1 h[1] h 1 1 dp[1]=0 dp[1] dp 1 0 dp[1]=1 dp[1] dp 1 1 for i in range(2,n+1):
	if h[i]==1:
		dp[i]==0
	else:
		dp[i]=dp[i-1]+dp[i-2] i range(2,n+1) range 2 n+1 n 1 if h[i]==1:
		dp[i]==0
	else:
		dp[i]=dp[i-1]+dp[i-2] h[i]==1 h[i] h i 1 dp[i]==0 dp[i] dp i 0 dp[i]=dp[i-1]+dp[i-2] dp[i] dp i dp[i-1]+dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 print(dp[n]%1000000007) print dp[n]%1000000007 dp[n] dp n 1000000007 h=[0 for _ in range(n+1)] [0 for _ in range(n+1)] h n,m=map(int,input().split()) map(int,input().split()) n m=map(int,input().split()) map(int,input().split()) m dp=[0 for _ in range(n+1)] [0 for _ in range(n+1)] dp s=int(input()) int(input()) s
import math
n,m=map(int,input().split())
h=[0 for _ in range(n+1)]
dp=[0 for _ in range(n+1)]
for i in range(m):
	s=int(input())
	h[s]=1
dp[0]=1
if h[1]==1:
	dp[1]=0
else:
	dp[1]=1
for i in range(2,n+1):
	if h[i]==1:
		dp[i]==0
	else:
		dp[i]=dp[i-1]+dp[i-2]
print(dp[n]%1000000007)
