The approach is . . .
1). As inappropriate as it may seem for a graduation hat, you must ignore the effects of air resistance.
2). Remember the acceleration due to gravity ... 9.8 m/s² downward.
That means that ANYTHING acted on by only the force of gravity has its
upward speed decreasing by 9.8 m/s every second. So any object tossed
upward at 5 m/s continues to rise for (5 / 9.8) seconds, whereupon it runs
out of gas and begins to fall.