converting excel equation to code?

I have a formula in an excel doc that I need to change into code, was imagining that I was doing right, but the result is different:

Excel code:

=((ROUNDUP(chain/5,0)-1)*5+10)*5

(chain is the variable number)

So far I have this code in unity:

var scoreMath : float;
var score : int;

scoreMath = ( ( ( chain/5 ) -1 ) *5+10 ) *5;

score += Mathf.FloorToInt(scoreMath);

They don’t seem to output the same number though

Floor would round down you want Ceil (ceiling).
Plus you order of operations is incorrect. Rounding afterwards would give you different results.

var scoreMath : float;
var score : int;

scoreMath = ( ( Mathf.Ceil ( chain/5f ) -1 ) *5+10 ) *5;

// not sure if floor is correct here.
score += Mathf.FloorToInt(scoreMath);