def integer(input):
    """Convert the given input to an integer value.
    
    :param input: the value to convert to an integer
    :type input: any
    
    :returns: converted integer value
    :rtype: int
    """
    
    try:
        return int(input)
    except (TypeError, ValueError):
        raise ValueError("Unable to convert {0!r} to an integer value.".format(input))