Objective function for maximized profit