program ccc

implicit none

integer :: n, m, i
integer,allocatable,dimension(:) :: a, dp

read*, n, m
allocate(a(m))
allocate(dp(0:n))
if(m/=0) then
read*, a
else
a=0
end if

dp=1

do i=1,m
dp(a(i))=0
end do

do i=2,n
if(dp(i)==1) then 
dp(i)=mod(dp(i-2)+dp(i-1),1000000007)
end if
end do

write(*,'(i0)') dp(n)

end program