def action(maximize, total_util, payoffs):
    """
    >>> action(True, 0.9, [1.1, 0, 1, 0.4])
    0
    >>> action(True, 1.1, [1.1, 0, 1, 0.4])
    1
    >>> action(False, 0.9, [1.1, 0, 1, 0.4])
    0.9
    """
    
    if maximize:
        return int(total_util > payoffs[2]) 
    else:
        return total_util