program main
  implicit none
  integer :: n, m, i
  integer, allocatable :: a(:), dp(:)
  logical, allocatable :: broken(:)
  read (*, *) n, m
  allocate (a(m), dp(-1:n), broken(n))
  read (*, *) (a(i), i = 1, m)
  broken(:) = .false.
  do i = 1, m
    broken(a(i)) = .true.
  end do
  dp(-1) = 0
  dp(0) = 1
  do i = 1, n
    dp(i) = dp(i - 1) + dp(i - 2)
    if (broken(i)) dp(i) = 0
    dp(i) = mod(dp(i), 1000000007)
  end do
  write (*, "(i0)") dp(n)
end program main
