The three-phase contact line of a droplet on a smooth surface can be characterized by the Young equation. It relates the interfacial energies to the macroscopic contact angle θ. On the mesoscale, wettability is modeled by a film-height-dependent wetting energy f( h). Macro- and mesoscale descriptions are consistent if γ cos θ = γ + f( h), where γ and h are the liquid-gas interface energy and the thickness of the equilibrium liquid adsorption layer, respectively. Here, we derive a similar consistency condition for the case of a liquid covered by an insoluble surfactant. At equilibrium, the surfactant is spatially inhomogeneously distributed, implying a nontrivial dependence of θ on surfactant concentration. We derive macroscopic and mesoscopic descriptions of a contact line at equilibrium and show that they are consistent only if a particular dependence of the wetting energy on the surfactant concentration is imposed. This is illustrated by a simple example of dilute surfactants, for which we show excellent agreement between theory and time-dependent numerical simulations.