[R.M's method][1] with suitable modification: Flatten @ Partition[list, 3, 5, 1, {}] > {3, 5, 5, 5, 1, 0, 4} Or for recent versions of *Mathematica* using [`UpTo`](http://reference.wolfram.com/language/ref/UpTo.html) Flatten @ Partition[list, UpTo[3], 5] [1]: https://mathematica.stackexchange.com/q/21186/121