Then your brokerage will provide you with a correct cost basis. you would declare it the same way as any other stock trade.
the only issue with ESPPs is if you make a disqualifying disposition, then you get slammed with W-2 income, and since brokerage does not know that your employer counter your discount as income, then you have to adjust it yourself when you report the sale. With qualifying dispositions this all goes away.