I came up with an equation while solving a question. The question is - suppose we have n numbers, from 1 up to n. How many groups of 3 numbers (repetition allowed) can be formed whose sum will be n.

The equation I came up with is something like this:

$\sum_{i=1}^{\left \lfloor \frac{n}{3} \right \rfloor} \left \lfloor \frac{n-i}{2} \right \rfloor-i+1$

This is giving correct result I hope. For example, for n=7, we can form 4 groups, (1,1,5), (1,2,4), (1,3,3), (2,2,3). My question is, how to get a more compact form of this equation? I am stuck since I don't find a way of finding the sum involving floor function.