def getByteCount(value: int) ->int:
    """Calculate the number of bytes required to represent value

    :value: value to check. Non-negative
    :returns: number of bytes to represent the number

    """
    assert value >= 0
    if 0 == value:
        return 1
    return (value.bit_length() + 7) // 8
