Problem 481 - What Goes up (optimized)