implicit none

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

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

allocate(dp(0:n))

dp(0:n) = 1
do i = 1, m
   dp(a(i)) = 0
enddo

do i = n-1, 0, -1
   if (dp(i) == 0) then
      cycle
   endif
   if (i < n-1) then
      dp(i) = dp(i+1) + dp(i+2)
   else
      dp(i) = dp(i+1)
   endif
enddo

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

stop
end