In a perfect competitive market the typical firm cannot affect the price of its output and so it maxmises profits or minimises losses when marginal cost is?

In a perfect competitive market the typical firm cannot affect the price of its output and so it maxmises profits or minimises losses when marginal cost is?