      PROGRAM TypicalStairs
      IMPLICIT NONE
      integer(16) :: n,m,a(10**5)
      integer(16) :: i,pattern(-1:10**5),aCnt=1
      
      read*,n,m
      do i = 1,m
        read*,a(i)
      end do
      
      pattern = 0
      !i=1
      if( a(aCnt)==1 )then
        pattern(1) = 0
        aCnt = aCnt + 1
      else
        pattern(1) = 1
      end if
      
      !i=2
      if( a(aCnt)==2 )then
        pattern(2) = 0
        aCnt = aCnt + 1
      else
        pattern(2) = pattern(1) + 1
      end if
      
      do i = 3,n
        if( a(aCnt)==i )then
          pattern(i) = 0
          aCnt = aCnt + 1
        else
          pattern(i) = pattern(i-2) + pattern(i-1)
          pattern(i) = mod(pattern(i),10**9+7)
        end if
      end do
      
      print*,pattern(n)
  !    print*,pattern(1:n)
      
      
      
      
      END PROGRAM