import decimal


def j_round(float_num):
    """java like rounding for complying with the OpenLR java: 2.5 -> 3"""
    num = decimal.Decimal(float_num).to_integral_value(rounding=decimal.ROUND_HALF_UP)
    return int(num)