How to round down / round up a number based on my own rounding off criteria?