class Example
{
	private static int specialRounding(double myValue) {
		int base = (int)Math.floor(myValue);
		double remainder = myValue - base;
		int intValue = remainder >= .8 ? base + 1 : base;
		return intValue;
	}
	private static void test(double myValue) {
		System.out.println(myValue + " => " + specialRounding(myValue));
	}
	public static void main (String[] args) throws java.lang.Exception
	{
		test(0.999);
		test(0.8);
		test(0.79);
	}
}