def calculate_maximum_position(velocity: int) -> int:
    """Calculate the maximum position if `velocity` decreases by one after each step"""
    final_position = (velocity * (velocity + 1)) // 2  # Gauss summation strikes again
    return final_position