implicit none

integer(8) :: n,m
integer(8), allocatable :: a(:), dp(:)
integer(8) :: i,j

read *,n,m
allocate(a(m))
do i = 1, m
   read *, a(i)
enddo

allocate(dp(0:n))

dp(n) = 1
do_i: do i = n-1, 0, -1
   do_j: do j = 1, m
      if (i == a(j)) then
         dp(i) = 0
         cycle do_i
      endif
   enddo do_j
   dp(i) = dp(i+1)
   if (i < n-1) then
      dp(i) = dp(i) + dp(i+2)
   endif
enddo do_i

write(6,'(i0)') mod(dp(0), 1000000007)

stop
end