contract SafeMath {

    uint constant DAY_IN_SECONDS = 86400;
    uint constant BASE = 1000000000000000000;

    function mul(uint256 a, uint256 b) constant internal returns (uint256) {
        uint256 c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) constant internal returns (uint256) {
        assert(b != 0); // Solidity automatically throws when dividing by 0
        uint256 c = a / b;
        assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }

    function sub(uint256 a, uint256 b) constant internal returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    function add(uint256 a, uint256 b) constant internal returns (uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
    }

    function mulByFraction(uint256 number, uint256 numerator, uint256 denominator) internal returns (uint256) {
        return div(mul(number, numerator), denominator);
    }

    // ICO date bonus calculation
    function dateBonus(uint roundIco, uint endIco, uint256 amount) internal returns (uint256) {
        if(endIco >= now && roundIco == 0){
            return add(amount,mulByFraction(amount, 15, 100));
        }else{
            return amount;
        }
    }

}
/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
function dateBonus(uint roundIco, uint endIco, uint256 amount) internal returns (uint256) {
        if(endIco >= now && roundIco == 0){
            return add(amount,mulByFraction(amount, 15, 100));
        }else{
            return amount;
        }
    }
// ICO date bonus calculation