def cost(num_steps: int) -> int:
    """
    the first step costs 1
    the second step costs 2 additional
    the third step costs 3 additional
    and so on

    uses the well-known fact that 
    1 + 2 + ... + n = n(n+1)/2
    """
    return num_steps * (num_steps + 1) // 2