using NCalc;
using System;
public class Program
{
public static void Main(string[] args)
Expression myExpr = new Expression("Min(Max((Floor((180 * (Round(%raw-score%, 4) - 0.6658) + 450)/ 10) * 10), 300), 900)");
System.Console.WriteLine(myExpr.Evaluate());
}