So here's the problem I need to buy a guitar for 3 out of every 4 people. Across the X axis (representing time) is the quantity of people.

Ex- 1 0 2 3 2 2 4 4 3 4 5 4 4 3 5 4 4 4 1 (people)

So the output that I would expect using the ground rules and assumptions that I have is

1 0 2 2 1 2 3 3 2 3 4 3 3 2 4 3 3 3 1 (guitars)

I lay in a guitar for each of the 1st 3 people out of a group of 4. The next year may contain a count from the prior year(s). Notice for the first 3 values they stay the same but once you reach the 4th value (year 4) it's decremented by 1 to account for not reaching 4 with the SUM of people in the prior years.

I need a formula that is drillable and allows me to change the amount of people per year and modifies the output (guitars) based on the qty and lay-in. Any questions don't hesitate to ask.

Super huge thanks in advance!!!