def optimal_advertising(prices, clicks):
    """Finds the optimal dot product

    Args:
     prices (list): prices we can charge advertisers
     clicks (list): expected clicks per slot

    Returns:
     float: the maximum we can get from the prices-clicks
    """
    clicks = sorted(clicks, reverse=True)
    prices = sorted(prices, reverse=True)
    clicks_and_prices = zip(clicks, prices)
    return sum(click * price for click, price in clicks_and_prices)