The relative abundance of the three decay modes B 0 → D − K + , B 0 → D − π + , and B 0 s → D − s π + produced in 7 TeV p p collisions at the LHC is determined from data corresponding to an integrated luminosity of 35 pb − 1 . The branching fraction of B 0 → D − K + is found to be B ( B 0 → D − K + ) = ( 2.01 ± 0.18 stat ± 0.14 syst ) × 10 − 4 . The ratio of fragmentation fractions f s / f d is determined through the relative abundance of B 0 s → D − s π + to B 0 → D − K + and B 0 → D − π + , leading to f s / f d = 0.253 ± 0.017 ± 0.017 ± 0.020 , where the uncertainties are statistical, systematic, and theoretical, respectively