This paper analyzes the first order behavior (that is, the right sided derivative) of the volume of the dilation A ⊕ tQ as t converges to zero. Here A and Q are subsets of n-dimensional Euclidean space, A has bounded perimeter and Q is compact. If Q consists of two points only, x and x+u, say, this derivative coincides up to sign with the directional derivative of the covariogram of A in direction u. By known results for the covariogram, this derivative can therefore be expressed by the cosine transform of the surface area measure of A. We extend this result to sets Q that are at most countable and use it to determine the derivative of the contact distribution function of a stationary random closed set at zero. A variant for uncountable Q is given, too. The proofs are based on approximation of the characteristic function of A by smooth functions of bounded variation and showing corresponding formulas for them.