program abc129c
  implicit none
  integer :: n, m, i
  integer,dimension(:),allocatable :: s, a
  read *, n, m
  allocate(s(-1:n),a(m))
  s = 1
  s(-1) = 0
  read *, a
  s(a) = 0
  do i = 1,n
     if (s(i)/=0) s(i) = mod(s(i-1)+s(i-2),10**9+7)
  end do
  print *, s(n)
end program abc129c
