Let $\pi \colon X\to \mathbb{P}^4$ be the blow-up of a smooth surface $S\subset \mathbb{P}^4$. Is there a formula to compute $(K_X)^4$ ? (which should be dependent on invariants of $S$).
In dimension $3$, the formula is $(K_X)^3=62-8d+2g$, where $d$ is the degree of the curve and $g$ is its genus.