A finite-time ruin probability formula for continuous claim severities