      program tokyoA
      implicit none

      integer(8) :: i,k,l,m,j,d,p
      real(8)::n
      integer(8),allocatable::B(:),A(:)

      read(*,*)n,k
      allocate(A(n),B(n))

      read(*,*)A(:)

      if (K >n*log(n))then
        A(:)=n
      else
      do i =1,k
        do j = 1,n
        B(j) =0
        end do
        do m =1,n
            d = A(m)
            B(m) =B(m)+1
            do l = 1,d
                if ((m+l).le.n)then
                    B(m+l) =B(m+l)+1
                endif
                if (m.gt.l)then
                    B(m-l) = B(m-l)+1
                endif
            end do
        end do
        do p = 1,n
            A(p) = B(p)
        end do

      end do
      endif

      write(*,*)A

      end program

      
