  Consider a function $f : \mathbb{T} \to \mathbb{C}$, $n$-times differentiable
on $\mathbb{T}$ and such that its $n$th derivative $f^{(n)}$ is bounded but not
necessarily continuous. Let $U : \mathbb{R} \to \mathcal{U}(\mathcal{H})$ be a
function taking values in the set of unitary operators on some separable
Hilbert space $\mathcal{H}$. Let $1<p<\infty$ and let
$\mathcal{S}^p(\mathcal{H})$ be the Schatten class of order $p$ on
$\mathcal{H}$. If $\tilde{U}:t\in\mathbb{R} \mapsto U(t)-U(0)$ is $n$-times
$\mathcal{S}^p$-differentiable on $\mathbb{R}$, we show that the operator
valued function $\varphi : t\in \mathbb{R} \mapsto f(U(t)) - f(U(0)) \in
\mathcal{S}^p(\mathcal{H})$ is $n$-times differentiable on $\mathbb{R}$ as
well. This theorem is optimal and extends several results related to the
differentiability of functions of unitaries. The derivatives of $\varphi$ are
given in terms of multiple operator integrals and a formula and
$\mathcal{S}^p$-estimates for the Taylor remainders of $\varphi$ are provided.
