How to make a simple calculation in HTML & JS with internal values

Good evening everyone,

I am trying to make an html email using a CRM that has a total price which i get from {total_price}
and a deposit 50% of the total price.
As there is no {deposit} in the CRM i am using , i though i would make a simple calculation

<!DOCTYPE html>

<html>
<p id="deposit"></p>
<script>

var x={total_price};
var y=0.5;
var  z=x*y;

document.getElementById("deposit").innerHTML = "Deposit : " + z + "€";
</script>

But my CRM doesn’t seem to be able to handle JS, is there any other way to have the same result?