A mean value formula for the variational p-Laplacian