def average(values):
    """Calculates an unweighted average

    Args:
        values (Iterable): The values to find the average of

    Returns:
        The average of the inputs

    Example:
        >>> average([1, 2, 3])
        2
    """

    res = sum(values) / len(values)

    if res == int(res):
        return int(res)

    return res