Saturated carboxylic acids on silicon: a first-principles study