import math


def city_cost(city: int) -> float:
    """
    Calculate the cost to purchase a specified city.

    :param city: The city to be purchased.
    :return: The cost to purchase the specified city.
    """
    city -= 1
    return 50000 * math.pow((city - 1), 3) + 150000 * city + 75000