import math


def max_returns(prices):
    """
    Calculate maxiumum possible return

    Args:
       prices(array): array of prices
    Returns:
       int: The maximum profit possible
    """
    current_min_price, max_profit = math.inf, 0
    for price in prices:
        if price < current_min_price:
            current_min_price = price

        if price - current_min_price > max_profit:
            max_profit = price - current_min_price

    return max_profit